grpc 1.81.1 → 1.85.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Makefile +70 -47
- data/etc/roots.pem +9008 -3936
- data/include/grpc/credentials.h +10 -0
- data/include/grpc/event_engine/memory_allocator.h +1 -0
- data/include/grpc/grpc.h +9 -7
- data/include/grpc/grpc_audit_logging.h +2 -2
- data/include/grpc/grpc_security_constants.h +6 -0
- data/include/grpc/impl/channel_arg_names.h +39 -1
- data/src/core/call/call_filters.h +35 -17
- data/src/core/call/call_spine.h +4 -4
- data/src/core/call/client_call.cc +22 -10
- data/src/core/call/client_call.h +4 -0
- data/src/core/{lib/security/authorization → call}/evaluate_args.cc +22 -1
- data/src/core/{lib/security/authorization → call}/evaluate_args.h +19 -5
- data/src/core/call/filter_fusion.h +15 -15
- data/src/core/call/interception_chain.cc +2 -0
- data/src/core/call/interception_chain.h +23 -13
- data/src/core/call/metadata.cc +7 -4
- data/src/core/call/metadata.h +1 -1
- data/src/core/call/metadata_batch.cc +2 -1
- data/src/core/call/metadata_batch.h +74 -38
- data/src/core/call/parsed_metadata.h +10 -5
- data/src/core/call/request_buffer.cc +6 -6
- data/src/core/call/request_buffer.h +1 -1
- data/src/core/call/server_call.cc +47 -18
- data/src/core/call/server_call.h +18 -5
- data/src/core/call/status_util.cc +0 -4
- data/src/core/call/status_util.h +0 -3
- data/src/core/channelz/channel_trace.cc +8 -6
- data/src/core/channelz/channel_trace.h +1 -1
- data/src/core/channelz/channelz.cc +9 -9
- data/src/core/channelz/channelz.h +12 -12
- data/src/core/channelz/channelz_registry.cc +10 -10
- data/src/core/channelz/text_encode.cc +9 -4
- data/src/core/channelz/v2tov1/convert.cc +2 -2
- data/src/core/channelz/ztrace_collector.h +5 -5
- data/src/core/client_channel/backup_poller.cc +3 -19
- data/src/core/client_channel/client_channel.cc +33 -65
- data/src/core/client_channel/client_channel.h +5 -3
- data/src/core/client_channel/client_channel_filter.cc +55 -99
- data/src/core/client_channel/client_channel_filter.h +4 -4
- data/src/core/client_channel/client_channel_plugin.cc +1 -1
- data/src/core/client_channel/client_channel_service_config.cc +4 -28
- data/src/core/client_channel/config_selector.h +2 -7
- data/src/core/client_channel/direct_channel.cc +12 -2
- data/src/core/client_channel/direct_channel.h +5 -3
- data/src/core/client_channel/dynamic_filters.cc +4 -7
- data/src/core/client_channel/dynamic_filters.h +1 -3
- data/src/core/client_channel/global_subchannel_pool.cc +4 -4
- data/src/core/client_channel/load_balanced_call_destination.cc +5 -3
- data/src/core/client_channel/retry_filter.cc +2 -25
- data/src/core/client_channel/retry_filter.h +3 -7
- data/src/core/client_channel/retry_filter_legacy_call_data.cc +6 -13
- data/src/core/client_channel/retry_filter_legacy_call_data.h +2 -2
- data/src/core/client_channel/retry_interceptor.cc +7 -35
- data/src/core/client_channel/retry_interceptor.h +11 -14
- data/src/core/client_channel/retry_service_config.cc +0 -2
- data/src/core/client_channel/retry_service_config.h +0 -2
- data/src/core/client_channel/retry_throttle.cc +19 -7
- data/src/core/client_channel/retry_throttle.h +24 -7
- data/src/core/client_channel/subchannel.cc +335 -1082
- data/src/core/client_channel/subchannel.h +44 -329
- data/src/core/client_channel/subchannel_metrics.cc +48 -0
- data/src/core/client_channel/subchannel_metrics.h +60 -0
- data/src/core/client_channel/subchannel_stream_client.cc +5 -5
- data/src/core/{resolver/dns/dns_resolver_plugin.h → config/experiment_env_var.cc} +12 -9
- data/src/core/config/experiment_env_var.h +26 -0
- data/src/core/credentials/call/external/aws_external_account_credentials.cc +7 -7
- data/src/core/credentials/call/external/aws_request_signer.cc +16 -0
- data/src/core/credentials/call/external/external_account_credentials.cc +129 -16
- data/src/core/credentials/call/external/external_account_credentials.h +6 -1
- data/src/core/credentials/call/external/file_external_account_credentials.cc +1 -1
- data/src/core/credentials/call/external/url_external_account_credentials.cc +2 -3
- data/src/core/credentials/call/gcp_service_account_identity/gcp_service_account_identity_credentials.cc +8 -24
- data/src/core/credentials/call/gcp_service_account_identity/gcp_service_account_identity_credentials.h +3 -6
- data/src/core/credentials/call/gdch_service_account/gdch_service_account_credentials.cc +525 -0
- data/src/core/credentials/call/gdch_service_account/gdch_service_account_credentials.h +138 -0
- data/src/core/credentials/call/json_util.h +1 -0
- data/src/core/credentials/call/jwt/json_token.cc +10 -2
- data/src/core/credentials/call/jwt/jwt_credentials.cc +11 -1
- data/src/core/credentials/call/jwt/jwt_credentials.h +3 -0
- data/src/core/credentials/call/jwt/jwt_verifier.cc +15 -1
- data/src/core/credentials/call/jwt_token_file/jwt_token_file_call_credentials.cc +1 -1
- data/src/core/credentials/call/oauth2/oauth2_credentials.cc +78 -62
- data/src/core/credentials/call/oauth2/oauth2_credentials.h +2 -6
- data/src/core/credentials/call/regional_access_boundary_fetcher.cc +411 -0
- data/src/core/credentials/call/regional_access_boundary_fetcher.h +158 -0
- data/src/core/credentials/call/token_fetcher/token_fetcher_credentials.cc +57 -36
- data/src/core/credentials/call/token_fetcher/token_fetcher_credentials.h +28 -9
- data/src/core/credentials/transport/google_default/google_default_credentials.cc +6 -7
- data/src/core/credentials/transport/insecure/insecure_security_connector.h +1 -1
- data/src/core/credentials/transport/local/local_security_connector.cc +1 -1
- data/src/core/credentials/transport/ssl/ssl_credentials.cc +59 -72
- data/src/core/credentials/transport/ssl/ssl_credentials.h +9 -8
- data/src/core/credentials/transport/ssl/ssl_security_connector.cc +26 -8
- data/src/core/credentials/transport/ssl/ssl_security_connector.h +4 -4
- data/src/core/credentials/transport/tls/grpc_tls_certificate_distributor.cc +38 -27
- data/src/core/credentials/transport/tls/grpc_tls_certificate_distributor.h +10 -7
- data/src/core/credentials/transport/tls/grpc_tls_certificate_provider.cc +51 -62
- data/src/core/credentials/transport/tls/grpc_tls_certificate_provider.h +5 -4
- data/src/core/credentials/transport/tls/grpc_tls_certificate_selector.cc +172 -0
- data/src/core/credentials/transport/tls/grpc_tls_certificate_selector.h +129 -0
- data/src/core/credentials/transport/tls/grpc_tls_certificate_verifier.cc +3 -3
- data/src/core/credentials/transport/tls/grpc_tls_crl_provider.cc +5 -5
- data/src/core/credentials/transport/tls/load_system_roots.h +2 -6
- data/src/core/credentials/transport/tls/load_system_roots_fallback.cc +5 -6
- data/src/core/credentials/transport/tls/load_system_roots_supported.cc +23 -18
- data/src/core/credentials/transport/tls/load_system_roots_supported.h +3 -2
- data/src/core/credentials/transport/tls/load_system_roots_windows.cc +5 -8
- data/src/core/credentials/transport/tls/spiffe_utils.cc +1 -1
- data/src/core/credentials/transport/tls/ssl_utils.cc +49 -28
- data/src/core/credentials/transport/tls/ssl_utils.h +12 -49
- data/src/core/credentials/transport/tls/tls_security_connector.cc +71 -44
- data/src/core/credentials/transport/tls/tls_security_connector.h +37 -16
- data/src/core/credentials/transport/tls/tls_utils.h +9 -0
- data/src/core/credentials/transport/xds/xds_credentials.cc +4 -12
- data/src/core/ext/filters/backend_metrics/backend_metric_filter.cc +6 -0
- data/src/core/ext/filters/channel_idle/legacy_channel_idle_filter.cc +16 -12
- data/src/core/ext/filters/fault_injection/fault_injection_filter.cc +29 -67
- data/src/core/ext/filters/fault_injection/fault_injection_filter.h +0 -8
- data/src/core/ext/filters/gcp_authentication/gcp_authentication_filter.cc +26 -60
- data/src/core/ext/filters/gcp_authentication/gcp_authentication_filter.h +24 -19
- data/src/core/ext/filters/http/http_filters_plugin.cc +20 -9
- data/src/core/ext/filters/http/message_compress/compression_filter.cc +40 -32
- data/src/core/ext/filters/http/message_compress/compression_filter.h +0 -1
- data/src/core/ext/filters/message_size/message_size_filter.cc +1 -81
- data/src/core/ext/filters/message_size/message_size_filter.h +1 -50
- data/src/core/ext/filters/rbac/rbac_filter.cc +43 -21
- data/src/core/ext/filters/rbac/rbac_filter.h +22 -4
- data/src/core/ext/filters/rbac/rbac_service_config_parser.cc +4 -3
- data/src/core/ext/filters/stateful_session/stateful_session_filter.cc +13 -56
- data/src/core/ext/filters/stateful_session/stateful_session_filter.h +0 -14
- data/src/core/ext/transport/chttp2/client/chttp2_connector.cc +7 -7
- data/src/core/ext/transport/chttp2/server/chttp2_server.cc +218 -93
- data/src/core/ext/transport/chttp2/server/chttp2_server.h +15 -12
- data/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +177 -95
- data/src/core/ext/transport/chttp2/transport/chttp2_transport.h +1 -0
- data/src/core/ext/transport/chttp2/transport/flow_control.cc +6 -3
- data/src/core/ext/transport/chttp2/transport/flow_control.h +92 -10
- data/src/core/ext/transport/chttp2/transport/flow_control_manager.h +2 -4
- data/src/core/ext/transport/chttp2/transport/frame.cc +120 -13
- data/src/core/ext/transport/chttp2/transport/frame.h +68 -10
- data/src/core/ext/transport/chttp2/transport/frame_data.cc +33 -2
- data/src/core/ext/transport/chttp2/transport/frame_goaway.cc +55 -23
- data/src/core/ext/transport/chttp2/transport/frame_goaway.h +1 -0
- data/src/core/ext/transport/chttp2/transport/frame_ping.cc +4 -1
- data/src/core/ext/transport/chttp2/transport/frame_rst_stream.cc +13 -7
- data/src/core/ext/transport/chttp2/transport/frame_rst_stream.h +1 -1
- data/src/core/ext/transport/chttp2/transport/frame_security.cc +10 -1
- data/src/core/ext/transport/chttp2/transport/frame_security.h +2 -1
- data/src/core/ext/transport/chttp2/transport/frame_settings.cc +4 -1
- data/src/core/ext/transport/chttp2/transport/goaway.cc +11 -1
- data/src/core/ext/transport/chttp2/transport/goaway.h +24 -1
- data/src/core/ext/transport/chttp2/transport/header_assembler.h +54 -22
- data/src/core/ext/transport/chttp2/transport/hpack_encoder.cc +53 -5
- data/src/core/ext/transport/chttp2/transport/hpack_parse_result.cc +22 -0
- data/src/core/ext/transport/chttp2/transport/hpack_parse_result.h +20 -0
- data/src/core/ext/transport/chttp2/transport/hpack_parser.cc +51 -5
- data/src/core/ext/transport/chttp2/transport/hpack_parser.h +8 -1
- data/src/core/ext/transport/chttp2/transport/http2_client_transport.cc +361 -550
- data/src/core/ext/transport/chttp2/transport/http2_client_transport.h +71 -50
- data/src/core/ext/transport/chttp2/transport/http2_server_transport.cc +2294 -0
- data/src/core/ext/transport/chttp2/transport/http2_server_transport.h +800 -0
- data/src/core/ext/transport/chttp2/transport/http2_settings.cc +1 -1
- data/src/core/ext/transport/chttp2/transport/http2_settings.h +49 -15
- data/src/core/ext/transport/chttp2/transport/http2_settings_manager.h +0 -2
- data/src/core/ext/transport/chttp2/transport/http2_settings_promises.h +75 -28
- data/src/core/ext/transport/chttp2/transport/http2_status.h +38 -37
- data/src/core/ext/transport/chttp2/transport/http2_transport.cc +207 -22
- data/src/core/ext/transport/chttp2/transport/http2_transport.h +337 -53
- data/src/core/ext/transport/chttp2/transport/internal.h +25 -1
- data/src/core/ext/transport/chttp2/transport/message_assembler.h +1 -2
- data/src/core/ext/transport/chttp2/transport/parsing.cc +97 -29
- data/src/core/ext/transport/chttp2/transport/ping_promise.cc +4 -3
- data/src/core/ext/transport/chttp2/transport/ping_promise.h +25 -5
- data/src/core/ext/transport/chttp2/transport/ping_rate_policy.cc +7 -14
- data/src/core/ext/transport/chttp2/transport/read_context.h +614 -0
- data/src/core/ext/transport/chttp2/transport/reclaimer.cc +32 -0
- data/src/core/ext/transport/chttp2/transport/reclaimer.h +64 -0
- data/src/core/ext/transport/chttp2/transport/security_frame.h +20 -10
- data/src/core/ext/transport/chttp2/transport/stream.h +347 -155
- data/src/core/ext/transport/chttp2/transport/stream_data_queue.h +100 -74
- data/src/core/ext/transport/chttp2/transport/write_cycle.h +32 -4
- data/src/core/ext/transport/chttp2/transport/writing.cc +0 -3
- data/src/core/ext/transport/inproc/inproc_transport.cc +6 -10
- data/src/core/ext/transport/inproc/legacy_inproc_transport.cc +20 -19
- data/src/core/ext/upb-gen/cel/expr/checked.upb.h +621 -432
- data/src/core/ext/upb-gen/cel/expr/checked.upb_minitable.c +264 -166
- data/src/core/ext/upb-gen/cel/expr/checked.upb_minitable.h +0 -13
- data/src/core/ext/upb-gen/cel/expr/syntax.upb.h +708 -497
- data/src/core/ext/upb-gen/cel/expr/syntax.upb_minitable.c +294 -176
- data/src/core/ext/upb-gen/cel/expr/syntax.upb_minitable.h +0 -15
- data/src/core/ext/upb-gen/envoy/admin/v3/certs.upb.h +262 -181
- data/src/core/ext/upb-gen/envoy/admin/v3/certs.upb_minitable.c +84 -58
- data/src/core/ext/upb-gen/envoy/admin/v3/certs.upb_minitable.h +0 -5
- data/src/core/ext/upb-gen/envoy/admin/v3/clusters.upb.h +254 -190
- data/src/core/ext/upb-gen/envoy/admin/v3/clusters.upb_minitable.c +107 -53
- data/src/core/ext/upb-gen/envoy/admin/v3/clusters.upb_minitable.h +0 -4
- data/src/core/ext/upb-gen/envoy/admin/v3/config_dump.upb.h +271 -190
- data/src/core/ext/upb-gen/envoy/admin/v3/config_dump.upb_minitable.c +88 -64
- data/src/core/ext/upb-gen/envoy/admin/v3/config_dump.upb_minitable.h +0 -5
- data/src/core/ext/upb-gen/envoy/admin/v3/config_dump_shared.upb.h +1035 -730
- data/src/core/ext/upb-gen/envoy/admin/v3/config_dump_shared.upb_minitable.c +384 -260
- data/src/core/ext/upb-gen/envoy/admin/v3/config_dump_shared.upb_minitable.h +0 -19
- data/src/core/ext/upb-gen/envoy/admin/v3/init_dump.upb.h +87 -56
- data/src/core/ext/upb-gen/envoy/admin/v3/init_dump.upb_minitable.c +26 -16
- data/src/core/ext/upb-gen/envoy/admin/v3/init_dump.upb_minitable.h +0 -2
- data/src/core/ext/upb-gen/envoy/admin/v3/listeners.upb.h +105 -71
- data/src/core/ext/upb-gen/envoy/admin/v3/listeners.upb_minitable.c +30 -22
- data/src/core/ext/upb-gen/envoy/admin/v3/listeners.upb_minitable.h +0 -2
- data/src/core/ext/upb-gen/envoy/admin/v3/memory.upb.h +31 -29
- data/src/core/ext/upb-gen/envoy/admin/v3/memory.upb_minitable.c +19 -7
- data/src/core/ext/upb-gen/envoy/admin/v3/memory.upb_minitable.h +0 -1
- data/src/core/ext/upb-gen/envoy/admin/v3/metrics.upb.h +25 -23
- data/src/core/ext/upb-gen/envoy/admin/v3/metrics.upb_minitable.c +15 -7
- data/src/core/ext/upb-gen/envoy/admin/v3/metrics.upb_minitable.h +0 -1
- data/src/core/ext/upb-gen/envoy/admin/v3/mutex_stats.upb.h +25 -23
- data/src/core/ext/upb-gen/envoy/admin/v3/mutex_stats.upb_minitable.c +15 -7
- data/src/core/ext/upb-gen/envoy/admin/v3/mutex_stats.upb_minitable.h +0 -1
- data/src/core/ext/upb-gen/envoy/admin/v3/server_info.upb.h +201 -165
- data/src/core/ext/upb-gen/envoy/admin/v3/server_info.upb_minitable.c +79 -31
- data/src/core/ext/upb-gen/envoy/admin/v3/server_info.upb_minitable.h +0 -2
- data/src/core/ext/upb-gen/envoy/admin/v3/tap.upb.h +29 -26
- data/src/core/ext/upb-gen/envoy/admin/v3/tap.upb_minitable.c +17 -11
- data/src/core/ext/upb-gen/envoy/admin/v3/tap.upb_minitable.h +0 -1
- data/src/core/ext/upb-gen/envoy/annotations/deprecation.upb.h +46 -29
- data/src/core/ext/upb-gen/envoy/annotations/deprecation.upb_minitable.c +37 -19
- data/src/core/ext/upb-gen/envoy/annotations/deprecation.upb_minitable.h +4 -4
- data/src/core/ext/upb-gen/envoy/annotations/resource.upb.h +34 -27
- data/src/core/ext/upb-gen/envoy/annotations/resource.upb_minitable.c +34 -13
- data/src/core/ext/upb-gen/envoy/annotations/resource.upb_minitable.h +1 -2
- data/src/core/ext/upb-gen/envoy/config/accesslog/v3/accesslog.upb.h +617 -452
- data/src/core/ext/upb-gen/envoy/config/accesslog/v3/accesslog.upb_minitable.c +221 -163
- data/src/core/ext/upb-gen/envoy/config/accesslog/v3/accesslog.upb_minitable.h +0 -16
- data/src/core/ext/upb-gen/envoy/config/bootstrap/v3/bootstrap.upb.h +1339 -970
- data/src/core/ext/upb-gen/envoy/config/bootstrap/v3/bootstrap.upb_minitable.c +484 -324
- data/src/core/ext/upb-gen/envoy/config/bootstrap/v3/bootstrap.upb_minitable.h +0 -23
- data/src/core/ext/upb-gen/envoy/config/cluster/v3/circuit_breaker.upb.h +181 -135
- data/src/core/ext/upb-gen/envoy/config/cluster/v3/circuit_breaker.upb_minitable.c +59 -43
- data/src/core/ext/upb-gen/envoy/config/cluster/v3/circuit_breaker.upb_minitable.h +0 -3
- data/src/core/ext/upb-gen/envoy/config/cluster/v3/cluster.upb.h +1353 -1028
- data/src/core/ext/upb-gen/envoy/config/cluster/v3/cluster.upb_minitable.c +535 -361
- data/src/core/ext/upb-gen/envoy/config/cluster/v3/cluster.upb_minitable.h +0 -25
- data/src/core/ext/upb-gen/envoy/config/cluster/v3/filter.upb.h +37 -33
- data/src/core/ext/upb-gen/envoy/config/cluster/v3/filter.upb_minitable.c +19 -13
- data/src/core/ext/upb-gen/envoy/config/cluster/v3/filter.upb_minitable.h +0 -1
- data/src/core/ext/upb-gen/envoy/config/cluster/v3/outlier_detection.upb.h +234 -196
- data/src/core/ext/upb-gen/envoy/config/cluster/v3/outlier_detection.upb_minitable.c +77 -57
- data/src/core/ext/upb-gen/envoy/config/cluster/v3/outlier_detection.upb_minitable.h +0 -1
- data/src/core/ext/upb-gen/envoy/config/common/matcher/v3/matcher.upb.h +695 -502
- data/src/core/ext/upb-gen/envoy/config/common/matcher/v3/matcher.upb_minitable.c +246 -186
- data/src/core/ext/upb-gen/envoy/config/common/matcher/v3/matcher.upb_minitable.h +0 -15
- data/src/core/ext/upb-gen/envoy/config/common/mutation_rules/v3/mutation_rules.upb.h +140 -116
- data/src/core/ext/upb-gen/envoy/config/common/mutation_rules/v3/mutation_rules.upb_minitable.c +53 -43
- data/src/core/ext/upb-gen/envoy/config/common/mutation_rules/v3/mutation_rules.upb_minitable.h +0 -3
- data/src/core/ext/upb-gen/envoy/config/core/v3/address.upb.h +363 -269
- data/src/core/ext/upb-gen/envoy/config/core/v3/address.upb_minitable.c +131 -89
- data/src/core/ext/upb-gen/envoy/config/core/v3/address.upb_minitable.h +0 -8
- data/src/core/ext/upb-gen/envoy/config/core/v3/backoff.upb.h +35 -31
- data/src/core/ext/upb-gen/envoy/config/core/v3/backoff.upb_minitable.c +15 -13
- data/src/core/ext/upb-gen/envoy/config/core/v3/backoff.upb_minitable.h +0 -1
- data/src/core/ext/upb-gen/envoy/config/core/v3/base.upb.h +1073 -769
- data/src/core/ext/upb-gen/envoy/config/core/v3/base.upb_minitable.c +515 -293
- data/src/core/ext/upb-gen/envoy/config/core/v3/base.upb_minitable.h +0 -30
- data/src/core/ext/upb-gen/envoy/config/core/v3/cel.upb.h +25 -23
- data/src/core/ext/upb-gen/envoy/config/core/v3/cel.upb_minitable.c +15 -7
- data/src/core/ext/upb-gen/envoy/config/core/v3/cel.upb_minitable.h +0 -1
- data/src/core/ext/upb-gen/envoy/config/core/v3/config_source.upb.h +375 -267
- data/src/core/ext/upb-gen/envoy/config/core/v3/config_source.upb_minitable.c +142 -86
- data/src/core/ext/upb-gen/envoy/config/core/v3/config_source.upb_minitable.h +0 -7
- data/src/core/ext/upb-gen/envoy/config/core/v3/event_service_config.upb.h +32 -27
- data/src/core/ext/upb-gen/envoy/config/core/v3/event_service_config.upb_minitable.c +13 -11
- data/src/core/ext/upb-gen/envoy/config/core/v3/event_service_config.upb_minitable.h +0 -1
- data/src/core/ext/upb-gen/envoy/config/core/v3/extension.upb.h +29 -26
- data/src/core/ext/upb-gen/envoy/config/core/v3/extension.upb_minitable.c +17 -11
- data/src/core/ext/upb-gen/envoy/config/core/v3/extension.upb_minitable.h +0 -1
- data/src/core/ext/upb-gen/envoy/config/core/v3/grpc_method_list.upb.h +87 -56
- data/src/core/ext/upb-gen/envoy/config/core/v3/grpc_method_list.upb_minitable.c +26 -16
- data/src/core/ext/upb-gen/envoy/config/core/v3/grpc_method_list.upb_minitable.h +0 -2
- data/src/core/ext/upb-gen/envoy/config/core/v3/grpc_service.upb.h +634 -468
- data/src/core/ext/upb-gen/envoy/config/core/v3/grpc_service.upb_minitable.c +255 -161
- data/src/core/ext/upb-gen/envoy/config/core/v3/grpc_service.upb_minitable.h +0 -14
- data/src/core/ext/upb-gen/envoy/config/core/v3/health_check.upb.h +672 -474
- data/src/core/ext/upb-gen/envoy/config/core/v3/health_check.upb_minitable.c +228 -130
- data/src/core/ext/upb-gen/envoy/config/core/v3/health_check.upb_minitable.h +0 -9
- data/src/core/ext/upb-gen/envoy/config/core/v3/http_service.upb.h +56 -40
- data/src/core/ext/upb-gen/envoy/config/core/v3/http_service.upb_minitable.c +15 -13
- data/src/core/ext/upb-gen/envoy/config/core/v3/http_service.upb_minitable.h +0 -1
- data/src/core/ext/upb-gen/envoy/config/core/v3/http_uri.upb.h +34 -29
- data/src/core/ext/upb-gen/envoy/config/core/v3/http_uri.upb_minitable.c +19 -11
- data/src/core/ext/upb-gen/envoy/config/core/v3/http_uri.upb_minitable.h +0 -1
- data/src/core/ext/upb-gen/envoy/config/core/v3/protocol.upb.h +811 -635
- data/src/core/ext/upb-gen/envoy/config/core/v3/protocol.upb_minitable.c +347 -221
- data/src/core/ext/upb-gen/envoy/config/core/v3/protocol.upb_minitable.h +0 -16
- data/src/core/ext/upb-gen/envoy/config/core/v3/proxy_protocol.upb.h +174 -118
- data/src/core/ext/upb-gen/envoy/config/core/v3/proxy_protocol.upb_minitable.c +62 -38
- data/src/core/ext/upb-gen/envoy/config/core/v3/proxy_protocol.upb_minitable.h +0 -4
- data/src/core/ext/upb-gen/envoy/config/core/v3/resolver.upb.h +78 -57
- data/src/core/ext/upb-gen/envoy/config/core/v3/resolver.upb_minitable.c +28 -18
- data/src/core/ext/upb-gen/envoy/config/core/v3/resolver.upb_minitable.h +0 -2
- data/src/core/ext/upb-gen/envoy/config/core/v3/socket_cmsg_headers.upb.h +37 -33
- data/src/core/ext/upb-gen/envoy/config/core/v3/socket_cmsg_headers.upb_minitable.c +22 -14
- data/src/core/ext/upb-gen/envoy/config/core/v3/socket_cmsg_headers.upb_minitable.h +0 -1
- data/src/core/ext/upb-gen/envoy/config/core/v3/socket_option.upb.h +159 -119
- data/src/core/ext/upb-gen/envoy/config/core/v3/socket_option.upb_minitable.c +47 -35
- data/src/core/ext/upb-gen/envoy/config/core/v3/socket_option.upb_minitable.h +0 -5
- data/src/core/ext/upb-gen/envoy/config/core/v3/substitution_format_string.upb.h +101 -76
- data/src/core/ext/upb-gen/envoy/config/core/v3/substitution_format_string.upb_minitable.c +41 -23
- data/src/core/ext/upb-gen/envoy/config/core/v3/substitution_format_string.upb_minitable.h +0 -2
- data/src/core/ext/upb-gen/envoy/config/core/v3/udp_socket_config.upb.h +35 -31
- data/src/core/ext/upb-gen/envoy/config/core/v3/udp_socket_config.upb_minitable.c +15 -13
- data/src/core/ext/upb-gen/envoy/config/core/v3/udp_socket_config.upb_minitable.h +0 -1
- data/src/core/ext/upb-gen/envoy/config/endpoint/v3/endpoint.upb.h +189 -127
- data/src/core/ext/upb-gen/envoy/config/endpoint/v3/endpoint.upb_minitable.c +79 -49
- data/src/core/ext/upb-gen/envoy/config/endpoint/v3/endpoint.upb_minitable.h +0 -4
- data/src/core/ext/upb-gen/envoy/config/endpoint/v3/endpoint_components.upb.h +378 -283
- data/src/core/ext/upb-gen/envoy/config/endpoint/v3/endpoint_components.upb_minitable.c +156 -98
- data/src/core/ext/upb-gen/envoy/config/endpoint/v3/endpoint_components.upb_minitable.h +0 -8
- data/src/core/ext/upb-gen/envoy/config/endpoint/v3/load_report.upb.h +354 -255
- data/src/core/ext/upb-gen/envoy/config/endpoint/v3/load_report.upb_minitable.c +125 -69
- data/src/core/ext/upb-gen/envoy/config/endpoint/v3/load_report.upb_minitable.h +0 -6
- data/src/core/ext/upb-gen/envoy/config/listener/v3/api_listener.upb.h +27 -24
- data/src/core/ext/upb-gen/envoy/config/listener/v3/api_listener.upb_minitable.c +13 -11
- data/src/core/ext/upb-gen/envoy/config/listener/v3/api_listener.upb_minitable.h +0 -1
- data/src/core/ext/upb-gen/envoy/config/listener/v3/listener.upb.h +611 -451
- data/src/core/ext/upb-gen/envoy/config/listener/v3/listener.upb_minitable.c +159 -119
- data/src/core/ext/upb-gen/envoy/config/listener/v3/listener.upb_minitable.h +0 -11
- data/src/core/ext/upb-gen/envoy/config/listener/v3/listener_components.upb.h +468 -321
- data/src/core/ext/upb-gen/envoy/config/listener/v3/listener_components.upb_minitable.c +157 -99
- data/src/core/ext/upb-gen/envoy/config/listener/v3/listener_components.upb_minitable.h +0 -6
- data/src/core/ext/upb-gen/envoy/config/listener/v3/quic_config.upb.h +146 -119
- data/src/core/ext/upb-gen/envoy/config/listener/v3/quic_config.upb_minitable.c +55 -35
- data/src/core/ext/upb-gen/envoy/config/listener/v3/quic_config.upb_minitable.h +0 -1
- data/src/core/ext/upb-gen/envoy/config/listener/v3/udp_listener_config.upb.h +61 -51
- data/src/core/ext/upb-gen/envoy/config/listener/v3/udp_listener_config.upb_minitable.c +16 -16
- data/src/core/ext/upb-gen/envoy/config/listener/v3/udp_listener_config.upb_minitable.h +0 -2
- data/src/core/ext/upb-gen/envoy/config/metrics/v3/metrics_service.upb.h +43 -39
- data/src/core/ext/upb-gen/envoy/config/metrics/v3/metrics_service.upb_minitable.c +25 -13
- data/src/core/ext/upb-gen/envoy/config/metrics/v3/metrics_service.upb_minitable.h +0 -1
- data/src/core/ext/upb-gen/envoy/config/metrics/v3/stats.upb.h +341 -247
- data/src/core/ext/upb-gen/envoy/config/metrics/v3/stats.upb_minitable.c +130 -84
- data/src/core/ext/upb-gen/envoy/config/metrics/v3/stats.upb_minitable.h +0 -8
- data/src/core/ext/upb-gen/envoy/config/overload/v3/overload.upb.h +452 -313
- data/src/core/ext/upb-gen/envoy/config/overload/v3/overload.upb_minitable.c +144 -100
- data/src/core/ext/upb-gen/envoy/config/overload/v3/overload.upb_minitable.h +0 -10
- data/src/core/ext/upb-gen/envoy/config/rbac/v3/rbac.upb.h +666 -493
- data/src/core/ext/upb-gen/envoy/config/rbac/v3/rbac.upb_minitable.c +251 -181
- data/src/core/ext/upb-gen/envoy/config/rbac/v3/rbac.upb_minitable.h +0 -12
- data/src/core/ext/upb-gen/envoy/config/route/v3/route.upb.h +327 -197
- data/src/core/ext/upb-gen/envoy/config/route/v3/route.upb_minitable.c +92 -48
- data/src/core/ext/upb-gen/envoy/config/route/v3/route.upb_minitable.h +0 -3
- data/src/core/ext/upb-gen/envoy/config/route/v3/route_components.upb.h +3583 -2532
- data/src/core/ext/upb-gen/envoy/config/route/v3/route_components.upb_minitable.c +1340 -816
- data/src/core/ext/upb-gen/envoy/config/route/v3/route_components.upb_minitable.h +0 -60
- data/src/core/ext/upb-gen/envoy/config/route/v3/scoped_route.upb.h +111 -82
- data/src/core/ext/upb-gen/envoy/config/route/v3/scoped_route.upb_minitable.c +48 -28
- data/src/core/ext/upb-gen/envoy/config/route/v3/scoped_route.upb_minitable.h +0 -3
- data/src/core/ext/upb-gen/envoy/config/tap/v3/common.upb.h +548 -410
- data/src/core/ext/upb-gen/envoy/config/tap/v3/common.upb_minitable.c +214 -148
- data/src/core/ext/upb-gen/envoy/config/tap/v3/common.upb_minitable.h +0 -12
- data/src/core/ext/upb-gen/envoy/config/trace/v3/datadog.upb.h +59 -50
- data/src/core/ext/upb-gen/envoy/config/trace/v3/datadog.upb_minitable.c +30 -20
- data/src/core/ext/upb-gen/envoy/config/trace/v3/datadog.upb_minitable.h +0 -2
- data/src/core/ext/upb-gen/envoy/config/trace/v3/dynamic_ot.upb.h +29 -26
- data/src/core/ext/upb-gen/envoy/config/trace/v3/dynamic_ot.upb_minitable.c +17 -11
- data/src/core/ext/upb-gen/envoy/config/trace/v3/dynamic_ot.upb_minitable.h +0 -1
- data/src/core/ext/upb-gen/envoy/config/trace/v3/http_tracer.upb.h +60 -49
- data/src/core/ext/upb-gen/envoy/config/trace/v3/http_tracer.upb_minitable.c +28 -20
- data/src/core/ext/upb-gen/envoy/config/trace/v3/http_tracer.upb_minitable.h +0 -2
- data/src/core/ext/upb-gen/envoy/config/trace/v3/lightstep.upb.h +50 -36
- data/src/core/ext/upb-gen/envoy/config/trace/v3/lightstep.upb_minitable.c +19 -11
- data/src/core/ext/upb-gen/envoy/config/trace/v3/lightstep.upb_minitable.h +0 -1
- data/src/core/ext/upb-gen/envoy/config/trace/v3/opentelemetry.upb.h +82 -63
- data/src/core/ext/upb-gen/envoy/config/trace/v3/opentelemetry.upb_minitable.c +27 -19
- data/src/core/ext/upb-gen/envoy/config/trace/v3/opentelemetry.upb_minitable.h +0 -1
- data/src/core/ext/upb-gen/envoy/config/trace/v3/service.upb.h +27 -24
- data/src/core/ext/upb-gen/envoy/config/trace/v3/service.upb_minitable.c +13 -11
- data/src/core/ext/upb-gen/envoy/config/trace/v3/service.upb_minitable.h +0 -1
- data/src/core/ext/upb-gen/envoy/config/trace/v3/skywalking.upb.h +70 -58
- data/src/core/ext/upb-gen/envoy/config/trace/v3/skywalking.upb_minitable.c +32 -22
- data/src/core/ext/upb-gen/envoy/config/trace/v3/skywalking.upb_minitable.h +0 -2
- data/src/core/ext/upb-gen/envoy/config/trace/v3/trace.upb.h +2 -5
- data/src/core/ext/upb-gen/envoy/config/trace/v3/trace.upb_minitable.c +1 -1
- data/src/core/ext/upb-gen/envoy/config/trace/v3/xray.upb.h +73 -62
- data/src/core/ext/upb-gen/envoy/config/trace/v3/xray.upb_minitable.c +39 -25
- data/src/core/ext/upb-gen/envoy/config/trace/v3/xray.upb_minitable.h +0 -2
- data/src/core/ext/upb-gen/envoy/config/trace/v3/zipkin.upb.h +49 -45
- data/src/core/ext/upb-gen/envoy/config/trace/v3/zipkin.upb_minitable.c +33 -13
- data/src/core/ext/upb-gen/envoy/config/trace/v3/zipkin.upb_minitable.h +0 -1
- data/src/core/ext/upb-gen/envoy/data/accesslog/v3/accesslog.upb.h +771 -588
- data/src/core/ext/upb-gen/envoy/data/accesslog/v3/accesslog.upb_minitable.c +383 -185
- data/src/core/ext/upb-gen/envoy/data/accesslog/v3/accesslog.upb_minitable.h +0 -16
- data/src/core/ext/upb-gen/envoy/extensions/clusters/aggregate/v3/cluster.upb.h +66 -47
- data/src/core/ext/upb-gen/envoy/extensions/clusters/aggregate/v3/cluster.upb_minitable.c +31 -17
- data/src/core/ext/upb-gen/envoy/extensions/clusters/aggregate/v3/cluster.upb_minitable.h +0 -2
- data/src/core/ext/upb-gen/envoy/extensions/common/matching/v3/extension_matcher.upb.h +69 -58
- data/src/core/ext/upb-gen/envoy/extensions/common/matching/v3/extension_matcher.upb_minitable.c +27 -23
- data/src/core/ext/upb-gen/envoy/extensions/common/matching/v3/extension_matcher.upb_minitable.h +0 -2
- data/src/core/ext/upb-gen/envoy/extensions/filters/common/fault/v3/fault.upb.h +151 -119
- data/src/core/ext/upb-gen/envoy/extensions/filters/common/fault/v3/fault.upb_minitable.c +45 -39
- data/src/core/ext/upb-gen/envoy/extensions/filters/common/fault/v3/fault.upb_minitable.h +0 -5
- data/src/core/ext/upb-gen/envoy/extensions/filters/common/matcher/action/v3/skip_action.upb.h +19 -17
- data/src/core/ext/upb-gen/envoy/extensions/filters/common/matcher/action/v3/skip_action.upb_minitable.c +1 -3
- data/src/core/ext/upb-gen/envoy/extensions/filters/common/matcher/action/v3/skip_action.upb_minitable.h +0 -1
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/composite/v3/composite.upb.h +144 -109
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/composite/v3/composite.upb_minitable.c +46 -38
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/composite/v3/composite.upb_minitable.h +0 -4
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/ext_proc/v3/ext_proc.upb.h +1912 -0
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/ext_proc/v3/ext_proc.upb_minitable.c +300 -0
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/ext_proc/v3/ext_proc.upb_minitable.h +37 -0
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/ext_proc/v3/processing_mode.upb.h +187 -0
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/ext_proc/v3/processing_mode.upb_minitable.c +64 -0
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/ext_proc/v3/processing_mode.upb_minitable.h +31 -0
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/fault/v3/fault.upb.h +184 -139
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/fault/v3/fault.upb_minitable.c +65 -35
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/fault/v3/fault.upb_minitable.h +0 -3
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/gcp_authn/v3/gcp_authn.upb.h +129 -106
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/gcp_authn/v3/gcp_authn.upb_minitable.c +69 -41
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/gcp_authn/v3/gcp_authn.upb_minitable.h +0 -4
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/rbac/v3/rbac.upb.h +83 -71
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/rbac/v3/rbac.upb_minitable.c +40 -26
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/rbac/v3/rbac.upb_minitable.h +0 -2
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/router/v3/router.upb.h +148 -101
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/router/v3/router.upb_minitable.c +45 -27
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/router/v3/router.upb_minitable.h +0 -2
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/stateful_session/v3/stateful_session.upb.h +62 -51
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/stateful_session/v3/stateful_session.upb_minitable.c +35 -21
- data/src/core/ext/upb-gen/envoy/extensions/filters/http/stateful_session/v3/stateful_session.upb_minitable.h +0 -2
- data/src/core/ext/upb-gen/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb.h +1362 -1024
- data/src/core/ext/upb-gen/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb_minitable.c +508 -336
- data/src/core/ext/upb-gen/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb_minitable.h +0 -22
- data/src/core/ext/upb-gen/envoy/extensions/grpc_service/call_credentials/access_token/v3/access_token_credentials.upb.h +21 -19
- data/src/core/ext/upb-gen/envoy/extensions/grpc_service/call_credentials/access_token/v3/access_token_credentials.upb_minitable.c +13 -7
- data/src/core/ext/upb-gen/envoy/extensions/grpc_service/call_credentials/access_token/v3/access_token_credentials.upb_minitable.h +0 -1
- data/src/core/ext/upb-gen/envoy/extensions/grpc_service/channel_credentials/tls/v3/tls_credentials.upb.h +35 -31
- data/src/core/ext/upb-gen/envoy/extensions/grpc_service/channel_credentials/tls/v3/tls_credentials.upb_minitable.c +15 -13
- data/src/core/ext/upb-gen/envoy/extensions/grpc_service/channel_credentials/tls/v3/tls_credentials.upb_minitable.h +0 -1
- data/src/core/ext/upb-gen/envoy/extensions/grpc_service/channel_credentials/xds/v3/xds_credentials.upb.h +27 -24
- data/src/core/ext/upb-gen/envoy/extensions/grpc_service/channel_credentials/xds/v3/xds_credentials.upb_minitable.c +13 -11
- data/src/core/ext/upb-gen/envoy/extensions/grpc_service/channel_credentials/xds/v3/xds_credentials.upb_minitable.h +0 -1
- data/src/core/ext/upb-gen/envoy/extensions/http/stateful_session/cookie/v3/cookie.upb.h +27 -24
- data/src/core/ext/upb-gen/envoy/extensions/http/stateful_session/cookie/v3/cookie.upb_minitable.c +13 -11
- data/src/core/ext/upb-gen/envoy/extensions/http/stateful_session/cookie/v3/cookie.upb_minitable.h +0 -1
- data/src/core/ext/upb-gen/envoy/extensions/load_balancing_policies/client_side_weighted_round_robin/v3/client_side_weighted_round_robin.upb.h +94 -74
- data/src/core/ext/upb-gen/envoy/extensions/load_balancing_policies/client_side_weighted_round_robin/v3/client_side_weighted_round_robin.upb_minitable.c +35 -23
- data/src/core/ext/upb-gen/envoy/extensions/load_balancing_policies/client_side_weighted_round_robin/v3/client_side_weighted_round_robin.upb_minitable.h +0 -1
- data/src/core/ext/upb-gen/envoy/extensions/load_balancing_policies/common/v3/common.upb.h +231 -179
- data/src/core/ext/upb-gen/envoy/extensions/load_balancing_policies/common/v3/common.upb_minitable.c +88 -66
- data/src/core/ext/upb-gen/envoy/extensions/load_balancing_policies/common/v3/common.upb_minitable.h +0 -6
- data/src/core/ext/upb-gen/envoy/extensions/load_balancing_policies/pick_first/v3/pick_first.upb.h +21 -19
- data/src/core/ext/upb-gen/envoy/extensions/load_balancing_policies/pick_first/v3/pick_first.upb_minitable.c +13 -7
- data/src/core/ext/upb-gen/envoy/extensions/load_balancing_policies/pick_first/v3/pick_first.upb_minitable.h +0 -1
- data/src/core/ext/upb-gen/envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.upb.h +63 -56
- data/src/core/ext/upb-gen/envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.upb_minitable.c +31 -19
- data/src/core/ext/upb-gen/envoy/extensions/load_balancing_policies/ring_hash/v3/ring_hash.upb_minitable.h +0 -1
- data/src/core/ext/upb-gen/envoy/extensions/load_balancing_policies/wrr_locality/v3/wrr_locality.upb.h +27 -24
- data/src/core/ext/upb-gen/envoy/extensions/load_balancing_policies/wrr_locality/v3/wrr_locality.upb_minitable.c +13 -11
- data/src/core/ext/upb-gen/envoy/extensions/load_balancing_policies/wrr_locality/v3/wrr_locality.upb_minitable.h +0 -1
- data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/http_11_proxy/v3/upstream_http_11_connect.upb.h +27 -24
- data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/http_11_proxy/v3/upstream_http_11_connect.upb_minitable.c +13 -11
- data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/http_11_proxy/v3/upstream_http_11_connect.upb_minitable.h +0 -1
- data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/tls/v3/cert.upb.h +2 -5
- data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/tls/v3/cert.upb_minitable.c +1 -1
- data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/tls/v3/common.upb.h +538 -364
- data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/tls/v3/common.upb_minitable.c +157 -95
- data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/tls/v3/common.upb_minitable.h +0 -8
- data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/tls/v3/secret.upb.h +150 -110
- data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/tls/v3/secret.upb_minitable.c +69 -49
- data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/tls/v3/secret.upb_minitable.h +0 -4
- data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/tls/v3/tls.upb.h +517 -389
- data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/tls/v3/tls.upb_minitable.c +182 -116
- data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/tls/v3/tls.upb_minitable.h +0 -7
- data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.upb.h +84 -62
- data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.upb_minitable.c +30 -22
- data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/tls/v3/tls_spiffe_validator_config.upb_minitable.h +0 -2
- data/src/core/ext/upb-gen/envoy/extensions/upstreams/http/v3/http_protocol_options.upb.h +340 -256
- data/src/core/ext/upb-gen/envoy/extensions/upstreams/http/v3/http_protocol_options.upb_minitable.c +92 -82
- data/src/core/ext/upb-gen/envoy/extensions/upstreams/http/v3/http_protocol_options.upb_minitable.h +0 -5
- data/src/core/ext/upb-gen/envoy/service/discovery/v3/ads.upb.h +19 -17
- data/src/core/ext/upb-gen/envoy/service/discovery/v3/ads.upb_minitable.c +1 -3
- data/src/core/ext/upb-gen/envoy/service/discovery/v3/ads.upb_minitable.h +0 -1
- data/src/core/ext/upb-gen/envoy/service/discovery/v3/discovery.upb.h +857 -566
- data/src/core/ext/upb-gen/envoy/service/discovery/v3/discovery.upb_minitable.c +288 -182
- data/src/core/ext/upb-gen/envoy/service/discovery/v3/discovery.upb_minitable.h +0 -15
- data/src/core/ext/upb-gen/envoy/service/ext_proc/v3/external_processor.upb.h +2362 -0
- data/src/core/ext/upb-gen/envoy/service/ext_proc/v3/external_processor.upb_minitable.c +556 -0
- data/src/core/ext/upb-gen/envoy/service/ext_proc/v3/external_processor.upb_minitable.h +47 -0
- data/src/core/ext/upb-gen/envoy/service/load_stats/v3/lrs.upb.h +105 -72
- data/src/core/ext/upb-gen/envoy/service/load_stats/v3/lrs.upb_minitable.c +36 -22
- data/src/core/ext/upb-gen/envoy/service/load_stats/v3/lrs.upb_minitable.h +0 -2
- data/src/core/ext/upb-gen/envoy/service/status/v3/csds.upb.h +312 -226
- data/src/core/ext/upb-gen/envoy/service/status/v3/csds.upb_minitable.c +132 -78
- data/src/core/ext/upb-gen/envoy/service/status/v3/csds.upb_minitable.h +0 -5
- data/src/core/ext/upb-gen/envoy/type/http/v3/cookie.upb.h +82 -61
- data/src/core/ext/upb-gen/envoy/type/http/v3/cookie.upb_minitable.c +35 -19
- data/src/core/ext/upb-gen/envoy/type/http/v3/cookie.upb_minitable.h +0 -2
- data/src/core/ext/upb-gen/envoy/type/http/v3/path_transformation.upb.h +123 -89
- data/src/core/ext/upb-gen/envoy/type/http/v3/path_transformation.upb_minitable.c +25 -25
- data/src/core/ext/upb-gen/envoy/type/http/v3/path_transformation.upb_minitable.h +0 -4
- data/src/core/ext/upb-gen/envoy/type/matcher/v3/address.upb.h +48 -33
- data/src/core/ext/upb-gen/envoy/type/matcher/v3/address.upb_minitable.c +13 -11
- data/src/core/ext/upb-gen/envoy/type/matcher/v3/address.upb_minitable.h +0 -1
- data/src/core/ext/upb-gen/envoy/type/matcher/v3/filter_state.upb.h +42 -36
- data/src/core/ext/upb-gen/envoy/type/matcher/v3/filter_state.upb_minitable.c +19 -13
- data/src/core/ext/upb-gen/envoy/type/matcher/v3/filter_state.upb_minitable.h +0 -1
- data/src/core/ext/upb-gen/envoy/type/matcher/v3/http_inputs.upb.h +101 -79
- data/src/core/ext/upb-gen/envoy/type/matcher/v3/http_inputs.upb_minitable.c +61 -31
- data/src/core/ext/upb-gen/envoy/type/matcher/v3/http_inputs.upb_minitable.h +0 -5
- data/src/core/ext/upb-gen/envoy/type/matcher/v3/metadata.upb.h +83 -60
- data/src/core/ext/upb-gen/envoy/type/matcher/v3/metadata.upb_minitable.c +37 -19
- data/src/core/ext/upb-gen/envoy/type/matcher/v3/metadata.upb_minitable.h +0 -2
- data/src/core/ext/upb-gen/envoy/type/matcher/v3/node.upb.h +56 -40
- data/src/core/ext/upb-gen/envoy/type/matcher/v3/node.upb_minitable.c +15 -13
- data/src/core/ext/upb-gen/envoy/type/matcher/v3/node.upb_minitable.h +0 -1
- data/src/core/ext/upb-gen/envoy/type/matcher/v3/number.upb.h +34 -29
- data/src/core/ext/upb-gen/envoy/type/matcher/v3/number.upb_minitable.c +13 -11
- data/src/core/ext/upb-gen/envoy/type/matcher/v3/number.upb_minitable.h +0 -1
- data/src/core/ext/upb-gen/envoy/type/matcher/v3/path.upb.h +32 -27
- data/src/core/ext/upb-gen/envoy/type/matcher/v3/path.upb_minitable.c +13 -11
- data/src/core/ext/upb-gen/envoy/type/matcher/v3/path.upb_minitable.h +0 -1
- data/src/core/ext/upb-gen/envoy/type/matcher/v3/regex.upb.h +88 -71
- data/src/core/ext/upb-gen/envoy/type/matcher/v3/regex.upb_minitable.c +48 -30
- data/src/core/ext/upb-gen/envoy/type/matcher/v3/regex.upb_minitable.h +0 -3
- data/src/core/ext/upb-gen/envoy/type/matcher/v3/status_code_input.upb.h +37 -30
- data/src/core/ext/upb-gen/envoy/type/matcher/v3/status_code_input.upb_minitable.c +1 -5
- data/src/core/ext/upb-gen/envoy/type/matcher/v3/status_code_input.upb_minitable.h +0 -2
- data/src/core/ext/upb-gen/envoy/type/matcher/v3/string.upb.h +95 -71
- data/src/core/ext/upb-gen/envoy/type/matcher/v3/string.upb_minitable.c +36 -22
- data/src/core/ext/upb-gen/envoy/type/matcher/v3/string.upb_minitable.h +0 -2
- data/src/core/ext/upb-gen/envoy/type/matcher/v3/struct.upb.h +79 -56
- data/src/core/ext/upb-gen/envoy/type/matcher/v3/struct.upb_minitable.c +26 -18
- data/src/core/ext/upb-gen/envoy/type/matcher/v3/struct.upb_minitable.h +0 -2
- data/src/core/ext/upb-gen/envoy/type/matcher/v3/value.upb.h +164 -124
- data/src/core/ext/upb-gen/envoy/type/matcher/v3/value.upb_minitable.c +54 -40
- data/src/core/ext/upb-gen/envoy/type/matcher/v3/value.upb_minitable.h +0 -4
- data/src/core/ext/upb-gen/envoy/type/metadata/v3/metadata.upb.h +200 -147
- data/src/core/ext/upb-gen/envoy/type/metadata/v3/metadata.upb_minitable.c +47 -41
- data/src/core/ext/upb-gen/envoy/type/metadata/v3/metadata.upb_minitable.h +0 -7
- data/src/core/ext/upb-gen/envoy/type/tracing/v3/custom_tag.upb.h +160 -130
- data/src/core/ext/upb-gen/envoy/type/tracing/v3/custom_tag.upb_minitable.c +89 -47
- data/src/core/ext/upb-gen/envoy/type/tracing/v3/custom_tag.upb_minitable.h +0 -5
- data/src/core/ext/upb-gen/envoy/type/v3/hash_policy.upb.h +78 -62
- data/src/core/ext/upb-gen/envoy/type/v3/hash_policy.upb_minitable.c +26 -20
- data/src/core/ext/upb-gen/envoy/type/v3/hash_policy.upb_minitable.h +0 -3
- data/src/core/ext/upb-gen/envoy/type/v3/http.upb.h +2 -5
- data/src/core/ext/upb-gen/envoy/type/v3/http.upb_minitable.c +1 -1
- data/src/core/ext/upb-gen/envoy/type/v3/http_status.upb.h +21 -19
- data/src/core/ext/upb-gen/envoy/type/v3/http_status.upb_minitable.c +13 -7
- data/src/core/ext/upb-gen/envoy/type/v3/http_status.upb_minitable.h +0 -1
- data/src/core/ext/upb-gen/envoy/type/v3/percent.upb.h +43 -36
- data/src/core/ext/upb-gen/envoy/type/v3/percent.upb_minitable.c +22 -12
- data/src/core/ext/upb-gen/envoy/type/v3/percent.upb_minitable.h +0 -2
- data/src/core/ext/upb-gen/envoy/type/v3/range.upb.h +67 -55
- data/src/core/ext/upb-gen/envoy/type/v3/range.upb_minitable.c +36 -18
- data/src/core/ext/upb-gen/envoy/type/v3/range.upb_minitable.h +0 -3
- data/src/core/ext/upb-gen/envoy/type/v3/ratelimit_strategy.upb.h +62 -51
- data/src/core/ext/upb-gen/envoy/type/v3/ratelimit_strategy.upb_minitable.c +33 -19
- data/src/core/ext/upb-gen/envoy/type/v3/ratelimit_strategy.upb_minitable.h +0 -2
- data/src/core/ext/upb-gen/envoy/type/v3/ratelimit_unit.upb.h +2 -5
- data/src/core/ext/upb-gen/envoy/type/v3/ratelimit_unit.upb_minitable.c +1 -1
- data/src/core/ext/upb-gen/envoy/type/v3/semantic_version.upb.h +25 -23
- data/src/core/ext/upb-gen/envoy/type/v3/semantic_version.upb_minitable.c +15 -7
- data/src/core/ext/upb-gen/envoy/type/v3/semantic_version.upb_minitable.h +0 -1
- data/src/core/ext/upb-gen/envoy/type/v3/token_bucket.upb.h +37 -33
- data/src/core/ext/upb-gen/envoy/type/v3/token_bucket.upb_minitable.c +19 -13
- data/src/core/ext/upb-gen/envoy/type/v3/token_bucket.upb_minitable.h +0 -1
- data/src/core/ext/upb-gen/google/api/annotations.upb.h +15 -13
- data/src/core/ext/upb-gen/google/api/annotations.upb_minitable.c +22 -7
- data/src/core/ext/upb-gen/google/api/annotations.upb_minitable.h +1 -1
- data/src/core/ext/upb-gen/google/api/expr/v1alpha1/checked.upb.h +619 -430
- data/src/core/ext/upb-gen/google/api/expr/v1alpha1/checked.upb_minitable.c +260 -168
- data/src/core/ext/upb-gen/google/api/expr/v1alpha1/checked.upb_minitable.h +0 -13
- data/src/core/ext/upb-gen/google/api/expr/v1alpha1/syntax.upb.h +734 -518
- data/src/core/ext/upb-gen/google/api/expr/v1alpha1/syntax.upb_minitable.c +312 -182
- data/src/core/ext/upb-gen/google/api/expr/v1alpha1/syntax.upb_minitable.h +0 -16
- data/src/core/ext/upb-gen/google/api/http.upb.h +146 -105
- data/src/core/ext/upb-gen/google/api/http.upb_minitable.c +65 -29
- data/src/core/ext/upb-gen/google/api/http.upb_minitable.h +0 -3
- data/src/core/ext/upb-gen/google/api/httpbody.upb.h +52 -37
- data/src/core/ext/upb-gen/google/api/httpbody.upb_minitable.c +19 -11
- data/src/core/ext/upb-gen/google/api/httpbody.upb_minitable.h +0 -1
- data/src/core/ext/upb-gen/google/protobuf/any.upb.h +23 -21
- data/src/core/ext/upb-gen/google/protobuf/any.upb_minitable.c +15 -7
- data/src/core/ext/upb-gen/google/protobuf/any.upb_minitable.h +0 -1
- data/src/core/ext/upb-gen/google/protobuf/descriptor.upb.h +2236 -1514
- data/src/core/ext/upb-gen/google/protobuf/descriptor.upb_minitable.c +824 -406
- data/src/core/ext/upb-gen/google/protobuf/descriptor.upb_minitable.h +0 -34
- data/src/core/ext/upb-gen/google/protobuf/duration.upb.h +23 -21
- data/src/core/ext/upb-gen/google/protobuf/duration.upb_minitable.c +15 -7
- data/src/core/ext/upb-gen/google/protobuf/duration.upb_minitable.h +0 -1
- data/src/core/ext/upb-gen/google/protobuf/empty.upb.h +19 -17
- data/src/core/ext/upb-gen/google/protobuf/empty.upb_minitable.c +1 -3
- data/src/core/ext/upb-gen/google/protobuf/empty.upb_minitable.h +0 -1
- data/src/core/ext/upb-gen/google/protobuf/struct.upb.h +149 -100
- data/src/core/ext/upb-gen/google/protobuf/struct.upb_minitable.c +59 -43
- data/src/core/ext/upb-gen/google/protobuf/struct.upb_minitable.h +0 -4
- data/src/core/ext/upb-gen/google/protobuf/timestamp.upb.h +23 -21
- data/src/core/ext/upb-gen/google/protobuf/timestamp.upb_minitable.c +15 -7
- data/src/core/ext/upb-gen/google/protobuf/timestamp.upb_minitable.h +0 -1
- data/src/core/ext/upb-gen/google/protobuf/wrappers.upb.h +181 -139
- data/src/core/ext/upb-gen/google/protobuf/wrappers.upb_minitable.c +99 -53
- data/src/core/ext/upb-gen/google/protobuf/wrappers.upb_minitable.h +0 -9
- data/src/core/ext/upb-gen/google/rpc/status.upb.h +52 -37
- data/src/core/ext/upb-gen/google/rpc/status.upb_minitable.c +19 -11
- data/src/core/ext/upb-gen/google/rpc/status.upb_minitable.h +0 -1
- data/src/core/ext/upb-gen/{src/proto/grpc/channelz → grpc/channelz/v1}/channelz.upb.h +1651 -1191
- data/src/core/ext/upb-gen/grpc/channelz/v1/channelz.upb_minitable.c +1157 -0
- data/src/core/ext/upb-gen/grpc/channelz/v1/channelz.upb_minitable.h +69 -0
- data/src/core/ext/upb-gen/{src/proto/grpc → grpc}/gcp/altscontext.upb.h +76 -56
- data/src/core/ext/upb-gen/grpc/gcp/altscontext.upb_minitable.c +93 -0
- data/src/core/ext/upb-gen/{src/proto/grpc → grpc}/gcp/altscontext.upb_minitable.h +5 -7
- data/src/core/ext/upb-gen/{src/proto/grpc → grpc}/gcp/handshaker.upb.h +621 -425
- data/src/core/ext/upb-gen/grpc/gcp/handshaker.upb_minitable.c +415 -0
- data/src/core/ext/upb-gen/{src/proto/grpc → grpc}/gcp/handshaker.upb_minitable.h +5 -17
- data/src/core/ext/upb-gen/{src/proto/grpc → grpc}/gcp/transport_security_common.upb.h +118 -88
- data/src/core/ext/upb-gen/grpc/gcp/transport_security_common.upb_minitable.c +119 -0
- data/src/core/ext/upb-gen/grpc/gcp/transport_security_common.upb_minitable.h +34 -0
- data/src/core/ext/upb-gen/grpc/health/v1/health.upb.h +329 -0
- data/src/core/ext/upb-gen/grpc/health/v1/health.upb_minitable.c +128 -0
- data/src/core/ext/upb-gen/{src/proto/grpc → grpc}/health/v1/health.upb_minitable.h +8 -7
- data/src/core/ext/upb-gen/{src/proto/grpc → grpc}/lb/v1/load_balancer.upb.h +313 -234
- data/src/core/ext/upb-gen/grpc/lb/v1/load_balancer.upb_minitable.c +243 -0
- data/src/core/ext/upb-gen/grpc/lb/v1/load_balancer.upb_minitable.h +39 -0
- data/src/core/ext/upb-gen/grpc/lookup/v1/rls.upb.h +497 -0
- data/src/core/ext/upb-gen/grpc/lookup/v1/rls.upb_minitable.c +120 -0
- data/src/core/ext/upb-gen/{src/proto/grpc → grpc}/lookup/v1/rls.upb_minitable.h +5 -8
- data/src/core/ext/upb-gen/{src/proto/grpc → grpc}/lookup/v1/rls_config.upb.h +540 -331
- data/src/core/ext/upb-gen/grpc/lookup/v1/rls_config.upb_minitable.c +290 -0
- data/src/core/ext/upb-gen/grpc/lookup/v1/rls_config.upb_minitable.h +39 -0
- data/src/core/ext/upb-gen/src/proto/grpc/channelz/v2/channelz.upb.h +189 -125
- data/src/core/ext/upb-gen/src/proto/grpc/channelz/v2/channelz.upb_minitable.c +59 -35
- data/src/core/ext/upb-gen/src/proto/grpc/channelz/v2/channelz.upb_minitable.h +0 -3
- data/src/core/ext/upb-gen/src/proto/grpc/channelz/v2/promise.upb.h +454 -343
- data/src/core/ext/upb-gen/src/proto/grpc/channelz/v2/promise.upb_minitable.c +204 -130
- data/src/core/ext/upb-gen/src/proto/grpc/channelz/v2/promise.upb_minitable.h +0 -11
- data/src/core/ext/upb-gen/src/proto/grpc/channelz/v2/property_list.upb.h +369 -243
- data/src/core/ext/upb-gen/src/proto/grpc/channelz/v2/property_list.upb_minitable.c +109 -79
- data/src/core/ext/upb-gen/src/proto/grpc/channelz/v2/property_list.upb_minitable.h +0 -7
- data/src/core/ext/upb-gen/src/proto/grpc/channelz/v2/service.upb.h +256 -175
- data/src/core/ext/upb-gen/src/proto/grpc/channelz/v2/service.upb_minitable.c +122 -68
- data/src/core/ext/upb-gen/src/proto/grpc/channelz/v2/service.upb_minitable.h +0 -8
- data/src/core/ext/upb-gen/udpa/annotations/migrate.upb.h +128 -91
- data/src/core/ext/upb-gen/udpa/annotations/migrate.upb_minitable.c +82 -41
- data/src/core/ext/upb-gen/udpa/annotations/migrate.upb_minitable.h +5 -8
- data/src/core/ext/upb-gen/udpa/annotations/security.upb.h +36 -29
- data/src/core/ext/upb-gen/udpa/annotations/security.upb_minitable.c +36 -13
- data/src/core/ext/upb-gen/udpa/annotations/security.upb_minitable.h +1 -2
- data/src/core/ext/upb-gen/udpa/annotations/sensitive.upb.h +13 -11
- data/src/core/ext/upb-gen/udpa/annotations/sensitive.upb_minitable.c +22 -7
- data/src/core/ext/upb-gen/udpa/annotations/sensitive.upb_minitable.h +1 -1
- data/src/core/ext/upb-gen/udpa/annotations/status.upb.h +36 -29
- data/src/core/ext/upb-gen/udpa/annotations/status.upb_minitable.c +36 -13
- data/src/core/ext/upb-gen/udpa/annotations/status.upb_minitable.h +1 -2
- data/src/core/ext/upb-gen/udpa/annotations/versioning.upb.h +34 -27
- data/src/core/ext/upb-gen/udpa/annotations/versioning.upb_minitable.c +34 -13
- data/src/core/ext/upb-gen/udpa/annotations/versioning.upb_minitable.h +1 -2
- data/src/core/ext/upb-gen/validate/validate.upb.h +1682 -1130
- data/src/core/ext/upb-gen/validate/validate.upb_minitable.c +587 -247
- data/src/core/ext/upb-gen/validate/validate.upb_minitable.h +4 -27
- data/src/core/ext/upb-gen/xds/annotations/v3/migrate.upb.h +128 -91
- data/src/core/ext/upb-gen/xds/annotations/v3/migrate.upb_minitable.c +82 -41
- data/src/core/ext/upb-gen/xds/annotations/v3/migrate.upb_minitable.h +5 -8
- data/src/core/ext/upb-gen/xds/annotations/v3/security.upb.h +36 -29
- data/src/core/ext/upb-gen/xds/annotations/v3/security.upb_minitable.c +36 -13
- data/src/core/ext/upb-gen/xds/annotations/v3/security.upb_minitable.h +1 -2
- data/src/core/ext/upb-gen/xds/annotations/v3/sensitive.upb.h +13 -11
- data/src/core/ext/upb-gen/xds/annotations/v3/sensitive.upb_minitable.c +22 -7
- data/src/core/ext/upb-gen/xds/annotations/v3/sensitive.upb_minitable.h +1 -1
- data/src/core/ext/upb-gen/xds/annotations/v3/status.upb.h +122 -90
- data/src/core/ext/upb-gen/xds/annotations/v3/status.upb_minitable.c +82 -39
- data/src/core/ext/upb-gen/xds/annotations/v3/status.upb_minitable.h +3 -7
- data/src/core/ext/upb-gen/xds/annotations/v3/versioning.upb.h +34 -27
- data/src/core/ext/upb-gen/xds/annotations/v3/versioning.upb_minitable.c +34 -13
- data/src/core/ext/upb-gen/xds/annotations/v3/versioning.upb_minitable.h +1 -2
- data/src/core/ext/upb-gen/xds/core/v3/authority.upb.h +21 -19
- data/src/core/ext/upb-gen/xds/core/v3/authority.upb_minitable.c +13 -7
- data/src/core/ext/upb-gen/xds/core/v3/authority.upb_minitable.h +0 -1
- data/src/core/ext/upb-gen/xds/core/v3/cidr.upb.h +29 -26
- data/src/core/ext/upb-gen/xds/core/v3/cidr.upb_minitable.c +17 -11
- data/src/core/ext/upb-gen/xds/core/v3/cidr.upb_minitable.h +0 -1
- data/src/core/ext/upb-gen/xds/core/v3/collection_entry.upb.h +70 -58
- data/src/core/ext/upb-gen/xds/core/v3/collection_entry.upb_minitable.c +32 -22
- data/src/core/ext/upb-gen/xds/core/v3/collection_entry.upb_minitable.h +0 -2
- data/src/core/ext/upb-gen/xds/core/v3/context_params.upb.h +53 -34
- data/src/core/ext/upb-gen/xds/core/v3/context_params.upb_minitable.c +26 -16
- data/src/core/ext/upb-gen/xds/core/v3/context_params.upb_minitable.h +0 -2
- data/src/core/ext/upb-gen/xds/core/v3/extension.upb.h +29 -26
- data/src/core/ext/upb-gen/xds/core/v3/extension.upb_minitable.c +17 -11
- data/src/core/ext/upb-gen/xds/core/v3/extension.upb_minitable.h +0 -1
- data/src/core/ext/upb-gen/xds/core/v3/resource.upb.h +37 -33
- data/src/core/ext/upb-gen/xds/core/v3/resource.upb_minitable.c +22 -14
- data/src/core/ext/upb-gen/xds/core/v3/resource.upb_minitable.h +0 -1
- data/src/core/ext/upb-gen/xds/core/v3/resource_locator.upb.h +102 -76
- data/src/core/ext/upb-gen/xds/core/v3/resource_locator.upb_minitable.c +43 -23
- data/src/core/ext/upb-gen/xds/core/v3/resource_locator.upb_minitable.h +0 -2
- data/src/core/ext/upb-gen/xds/core/v3/resource_name.upb.h +33 -30
- data/src/core/ext/upb-gen/xds/core/v3/resource_name.upb_minitable.c +19 -11
- data/src/core/ext/upb-gen/xds/core/v3/resource_name.upb_minitable.h +0 -1
- data/src/core/ext/upb-gen/xds/data/orca/v3/orca_load_report.upb.h +136 -83
- data/src/core/ext/upb-gen/xds/data/orca/v3/orca_load_report.upb_minitable.c +41 -33
- data/src/core/ext/upb-gen/xds/data/orca/v3/orca_load_report.upb_minitable.h +0 -4
- data/src/core/ext/upb-gen/xds/service/orca/v3/orca.upb.h +46 -32
- data/src/core/ext/upb-gen/xds/service/orca/v3/orca.upb_minitable.c +20 -12
- data/src/core/ext/upb-gen/xds/service/orca/v3/orca.upb_minitable.h +0 -1
- data/src/core/ext/upb-gen/xds/type/matcher/v3/cel.upb.h +29 -26
- data/src/core/ext/upb-gen/xds/type/matcher/v3/cel.upb_minitable.c +20 -12
- data/src/core/ext/upb-gen/xds/type/matcher/v3/cel.upb_minitable.h +0 -1
- data/src/core/ext/upb-gen/xds/type/matcher/v3/domain.upb.h +93 -61
- data/src/core/ext/upb-gen/xds/type/matcher/v3/domain.upb_minitable.c +28 -20
- data/src/core/ext/upb-gen/xds/type/matcher/v3/domain.upb_minitable.h +0 -2
- data/src/core/ext/upb-gen/xds/type/matcher/v3/http_inputs.upb.h +19 -17
- data/src/core/ext/upb-gen/xds/type/matcher/v3/http_inputs.upb_minitable.c +1 -3
- data/src/core/ext/upb-gen/xds/type/matcher/v3/http_inputs.upb_minitable.h +0 -1
- data/src/core/ext/upb-gen/xds/type/matcher/v3/ip.upb.h +105 -71
- data/src/core/ext/upb-gen/xds/type/matcher/v3/ip.upb_minitable.c +32 -22
- data/src/core/ext/upb-gen/xds/type/matcher/v3/ip.upb_minitable.h +0 -2
- data/src/core/ext/upb-gen/xds/type/matcher/v3/matcher.upb.h +430 -314
- data/src/core/ext/upb-gen/xds/type/matcher/v3/matcher.upb_minitable.c +153 -123
- data/src/core/ext/upb-gen/xds/type/matcher/v3/matcher.upb_minitable.h +0 -10
- data/src/core/ext/upb-gen/xds/type/matcher/v3/range.upb.h +307 -199
- data/src/core/ext/upb-gen/xds/type/matcher/v3/range.upb_minitable.c +74 -62
- data/src/core/ext/upb-gen/xds/type/matcher/v3/range.upb_minitable.h +0 -6
- data/src/core/ext/upb-gen/xds/type/matcher/v3/regex.upb.h +52 -42
- data/src/core/ext/upb-gen/xds/type/matcher/v3/regex.upb_minitable.c +19 -13
- data/src/core/ext/upb-gen/xds/type/matcher/v3/regex.upb_minitable.h +0 -2
- data/src/core/ext/upb-gen/xds/type/matcher/v3/string.upb.h +95 -71
- data/src/core/ext/upb-gen/xds/type/matcher/v3/string.upb_minitable.c +36 -22
- data/src/core/ext/upb-gen/xds/type/matcher/v3/string.upb_minitable.h +0 -2
- data/src/core/ext/upb-gen/xds/type/v3/cel.upb.h +92 -77
- data/src/core/ext/upb-gen/xds/type/v3/cel.upb_minitable.c +42 -28
- data/src/core/ext/upb-gen/xds/type/v3/cel.upb_minitable.h +0 -2
- data/src/core/ext/upb-gen/xds/type/v3/range.upb.h +67 -55
- data/src/core/ext/upb-gen/xds/type/v3/range.upb_minitable.c +36 -18
- data/src/core/ext/upb-gen/xds/type/v3/range.upb_minitable.h +0 -3
- data/src/core/ext/upb-gen/xds/type/v3/typed_struct.upb.h +29 -26
- data/src/core/ext/upb-gen/xds/type/v3/typed_struct.upb_minitable.c +17 -11
- data/src/core/ext/upb-gen/xds/type/v3/typed_struct.upb_minitable.h +0 -1
- data/src/core/ext/upbdefs-gen/envoy/extensions/filters/http/ext_proc/v3/ext_proc.upbdefs.c +453 -0
- data/src/core/ext/upbdefs-gen/envoy/extensions/filters/http/ext_proc/v3/ext_proc.upbdefs.h +67 -0
- data/src/core/ext/upbdefs-gen/envoy/extensions/filters/http/ext_proc/v3/processing_mode.upbdefs.c +142 -0
- data/src/core/ext/upbdefs-gen/envoy/extensions/filters/http/ext_proc/v3/processing_mode.upbdefs.h +37 -0
- data/src/core/ext/upbdefs-gen/google/protobuf/descriptor.upbdefs.c +885 -855
- data/src/core/ext/upbdefs-gen/grpc/channelz/v1/channelz.upbdefs.c +733 -0
- data/src/core/ext/upbdefs-gen/{src/proto/grpc/channelz → grpc/channelz/v1}/channelz.upbdefs.h +44 -44
- data/src/core/ext/upbdefs-gen/grpc/lookup/v1/rls_config.upbdefs.c +182 -0
- data/src/core/ext/upbdefs-gen/{src/proto/grpc → grpc}/lookup/v1/rls_config.upbdefs.h +14 -14
- data/src/core/filter/auth/server_auth_filter.cc +2 -3
- data/src/core/filter/composite/composite_filter.cc +53 -34
- data/src/core/filter/composite/composite_filter.h +16 -5
- data/src/core/filter/ext_proc/ext_proc_filter.cc +1781 -0
- data/src/core/filter/ext_proc/ext_proc_filter.h +188 -0
- data/src/core/filter/ext_proc/ext_proc_messages.cc +756 -0
- data/src/core/filter/ext_proc/ext_proc_messages.h +324 -0
- data/src/core/filter/filter_args.h +17 -24
- data/src/core/handshaker/handshaker.cc +14 -6
- data/src/core/handshaker/http_connect/http_connect_client_handshaker.cc +3 -3
- data/src/core/handshaker/http_connect/http_proxy_mapper.cc +30 -3
- data/src/core/handshaker/security/pipelined_secure_endpoint.cc +10 -10
- data/src/core/handshaker/security/secure_endpoint.cc +69 -14
- data/src/core/handshaker/security/security_handshaker.cc +15 -12
- data/src/core/handshaker/tcp_connect/tcp_connect_handshaker.cc +4 -4
- data/src/core/lib/channel/channel_args.cc +20 -0
- data/src/core/lib/channel/channel_args.h +29 -23
- data/src/core/lib/channel/channel_stack.cc +4 -2
- data/src/core/lib/channel/channel_stack.h +3 -7
- data/src/core/lib/channel/channel_stack_builder_impl.cc +2 -3
- data/src/core/lib/channel/channel_stack_builder_impl.h +0 -7
- data/src/core/lib/channel/promise_based_filter.cc +222 -24
- data/src/core/lib/channel/promise_based_filter.h +328 -206
- data/src/core/lib/compression/compression_internal.cc +4 -5
- data/src/core/lib/compression/message_compress.cc +132 -97
- data/src/core/lib/compression/message_compress.h +24 -0
- data/src/core/lib/debug/trace_flags.cc +10 -0
- data/src/core/lib/debug/trace_flags.h +4 -0
- data/src/core/lib/event_engine/ares_resolver.cc +68 -64
- data/src/core/lib/event_engine/ares_resolver.h +3 -2
- data/src/core/lib/event_engine/cf_engine/cf_engine.cc +7 -7
- data/src/core/lib/event_engine/cf_engine/cfsocket_listener.cc +4 -4
- data/src/core/lib/event_engine/default_event_engine.cc +5 -5
- data/src/core/lib/event_engine/extensions/chaotic_good_extension.h +0 -13
- data/src/core/lib/event_engine/extensions/receive_coalescing_extension.h +44 -0
- data/src/core/lib/event_engine/extensions/tcp_trace.h +1 -1
- data/src/core/lib/event_engine/posix.h +2 -0
- data/src/core/lib/event_engine/posix_engine/ev_epoll1_linux.cc +12 -12
- data/src/core/lib/event_engine/posix_engine/ev_poll_posix.cc +20 -24
- data/src/core/lib/event_engine/posix_engine/file_descriptor_collection.cc +6 -6
- data/src/core/lib/event_engine/posix_engine/grpc_polled_fd_posix.h +3 -3
- data/src/core/lib/event_engine/posix_engine/native_posix_dns_resolver.cc +2 -1
- data/src/core/lib/event_engine/posix_engine/posix_endpoint.cc +84 -40
- data/src/core/lib/event_engine/posix_engine/posix_endpoint.h +11 -11
- data/src/core/lib/event_engine/posix_engine/posix_engine.cc +32 -37
- data/src/core/lib/event_engine/posix_engine/posix_engine_listener.cc +4 -4
- data/src/core/lib/event_engine/posix_engine/posix_engine_listener_utils.cc +2 -1
- data/src/core/lib/event_engine/posix_engine/posix_interface_posix.cc +10 -10
- data/src/core/lib/event_engine/posix_engine/posix_write_event_sink.h +1 -1
- data/src/core/lib/event_engine/posix_engine/tcp_socket_utils.cc +3 -0
- data/src/core/lib/event_engine/posix_engine/tcp_socket_utils.h +3 -0
- data/src/core/lib/event_engine/posix_engine/timer.cc +5 -5
- data/src/core/lib/event_engine/posix_engine/timer_manager.cc +5 -5
- data/src/core/lib/event_engine/posix_engine/traced_buffer_list.cc +3 -3
- data/src/core/lib/event_engine/posix_engine/traced_buffer_list.h +1 -1
- data/src/core/lib/event_engine/shim.cc +2 -16
- data/src/core/lib/event_engine/shim.h +0 -4
- data/src/core/lib/event_engine/thread_pool/thread_count.cc +1 -1
- data/src/core/lib/event_engine/thread_pool/thread_count.h +3 -3
- data/src/core/lib/event_engine/thread_pool/work_stealing_thread_pool.cc +50 -21
- data/src/core/lib/event_engine/thready_event_engine/thready_event_engine.cc +3 -3
- data/src/core/lib/event_engine/windows/grpc_polled_fd_windows.cc +4 -4
- data/src/core/lib/event_engine/windows/native_windows_dns_resolver.cc +5 -4
- data/src/core/lib/event_engine/windows/windows_endpoint.cc +1 -3
- data/src/core/lib/event_engine/windows/windows_engine.cc +15 -15
- data/src/core/lib/event_engine/windows/windows_listener.cc +6 -6
- data/src/core/lib/event_engine/work_queue/basic_work_queue.cc +6 -6
- data/src/core/lib/experiments/experiments.cc +414 -267
- data/src/core/lib/experiments/experiments.h +231 -130
- data/src/core/lib/iomgr/buffer_list.cc +3 -3
- data/src/core/lib/iomgr/buffer_list.h +2 -2
- data/src/core/lib/iomgr/cfstream_handle.cc +2 -6
- data/src/core/lib/iomgr/combiner.cc +0 -1
- data/src/core/lib/iomgr/endpoint_cfstream.cc +3 -10
- data/src/core/lib/iomgr/error.cc +5 -79
- data/src/core/lib/iomgr/error.h +8 -6
- data/src/core/lib/iomgr/error_cfstream.cc +1 -2
- data/src/core/lib/iomgr/ev_apple.cc +4 -4
- data/src/core/lib/iomgr/ev_epoll1_linux.cc +3 -7
- data/src/core/lib/iomgr/ev_poll_posix.cc +7 -15
- data/src/core/lib/iomgr/event_engine_shims/closure.cc +1 -1
- data/src/core/lib/iomgr/event_engine_shims/endpoint.cc +5 -6
- data/src/core/lib/iomgr/event_engine_shims/tcp_client.cc +1 -2
- data/src/core/lib/iomgr/iomgr_posix.cc +0 -4
- data/src/core/lib/iomgr/iomgr_posix_cfstream.cc +0 -4
- data/src/core/lib/iomgr/iomgr_windows.cc +0 -4
- data/src/core/lib/iomgr/socket_factory_posix.h +1 -1
- data/src/core/lib/iomgr/socket_utils_posix.cc +3 -0
- data/src/core/lib/iomgr/socket_utils_posix.h +3 -0
- data/src/core/lib/iomgr/systemd_utils.cc +0 -1
- data/src/core/lib/iomgr/tcp_client.h +1 -1
- data/src/core/lib/iomgr/tcp_client_posix.cc +3 -3
- data/src/core/lib/iomgr/tcp_posix.cc +33 -28
- data/src/core/lib/iomgr/tcp_server.h +1 -1
- data/src/core/lib/iomgr/tcp_server_posix.cc +5 -6
- data/src/core/lib/iomgr/tcp_server_utils_posix.h +0 -1
- data/src/core/lib/iomgr/tcp_server_utils_posix_common.cc +1 -1
- data/src/core/lib/iomgr/tcp_server_windows.cc +0 -1
- data/src/core/lib/iomgr/tcp_windows.cc +5 -10
- data/src/core/lib/iomgr/unix_sockets_posix.cc +2 -4
- data/src/core/lib/iomgr/unix_sockets_posix.h +3 -1
- data/src/core/lib/iomgr/vsock.h +3 -1
- data/src/core/lib/promise/activity.cc +1 -1
- data/src/core/lib/promise/activity.h +1 -1
- data/src/core/lib/promise/arena_promise.h +7 -7
- data/src/core/lib/promise/detail/promise_factory.h +14 -14
- data/src/core/lib/promise/detail/promise_like.h +4 -4
- data/src/core/lib/promise/inter_activity_latch.h +6 -6
- data/src/core/lib/promise/inter_activity_pipe.h +1 -1
- data/src/core/lib/promise/interceptor_list.h +1 -1
- data/src/core/lib/promise/observable.h +3 -3
- data/src/core/lib/promise/party.cc +1 -1
- data/src/core/lib/promise/try_seq.h +4 -4
- data/src/core/lib/resource_quota/arena.h +3 -3
- data/src/core/lib/resource_quota/memory_quota.cc +17 -17
- data/src/core/lib/resource_quota/memory_quota.h +1 -1
- data/src/core/lib/resource_quota/telemetry.cc +54 -0
- data/src/core/lib/resource_quota/telemetry.h +5 -23
- data/src/core/lib/resource_quota/thread_quota.cc +3 -3
- data/src/core/lib/security/authorization/audit_logging.cc +7 -7
- data/src/core/lib/security/authorization/audit_logging.h +3 -3
- data/src/core/lib/security/authorization/authorization_engine.h +1 -1
- data/src/core/lib/security/authorization/grpc_authorization_engine.cc +11 -13
- data/src/core/lib/security/authorization/grpc_authorization_engine.h +2 -2
- data/src/core/lib/security/authorization/grpc_server_authz_filter.cc +1 -1
- data/src/core/lib/security/authorization/grpc_server_authz_filter.h +1 -1
- data/src/core/lib/security/authorization/matchers.cc +20 -20
- data/src/core/lib/security/authorization/matchers.h +16 -17
- data/src/core/lib/security/authorization/rbac_policy.cc +139 -56
- data/src/core/lib/security/authorization/rbac_policy.h +22 -4
- data/src/core/lib/security/authorization/stdout_logger.cc +3 -3
- data/src/core/lib/security/authorization/stdout_logger.h +6 -5
- data/src/core/lib/surface/call.cc +16 -24
- data/src/core/lib/surface/call.h +14 -3
- data/src/core/lib/surface/call_utils.h +117 -0
- data/src/core/lib/surface/channel.cc +22 -3
- data/src/core/lib/surface/channel.h +15 -7
- data/src/core/lib/surface/channel_create.cc +1 -1
- data/src/core/lib/surface/channel_create.h +0 -2
- data/src/core/lib/surface/channel_init.cc +78 -39
- data/src/core/lib/surface/channel_init.h +30 -16
- data/src/core/lib/surface/filter_stack_call.cc +15 -39
- data/src/core/lib/surface/init.cc +20 -34
- data/src/core/lib/surface/lame_client.cc +1 -1
- data/src/core/lib/surface/legacy_channel.cc +11 -9
- data/src/core/lib/surface/legacy_channel.h +3 -1
- data/src/core/lib/surface/version.cc +2 -2
- data/src/core/lib/transport/bdp_estimator.cc +13 -13
- data/src/core/lib/transport/bdp_estimator.h +9 -5
- data/src/core/lib/transport/error_utils.cc +23 -162
- data/src/core/lib/transport/error_utils.h +0 -16
- data/src/core/lib/transport/promise_endpoint.h +8 -8
- data/src/core/lib/transport/transport.h +38 -9
- data/src/core/lib/transport/transport_framing_endpoint_extension.h +3 -3
- data/src/core/load_balancing/autosharding/autosharding.cc +931 -0
- data/src/core/load_balancing/autosharding/autosharding.h +78 -0
- data/src/core/load_balancing/grpclb/grpclb.cc +2 -1
- data/src/core/load_balancing/grpclb/grpclb_client_stats.cc +2 -2
- data/src/core/load_balancing/grpclb/load_balancer_api.cc +1 -1
- data/src/core/load_balancing/grpclb/load_balancer_api.h +3 -1
- data/src/core/load_balancing/health_check_client.cc +7 -7
- data/src/core/load_balancing/lb_policy.cc +1 -1
- data/src/core/load_balancing/oob_backend_metric.cc +5 -5
- data/src/core/load_balancing/outlier_detection/outlier_detection.cc +2 -2
- data/src/core/load_balancing/pick_first/pick_first.cc +35 -2
- data/src/core/load_balancing/pick_first/pick_first.h +6 -0
- data/src/core/load_balancing/ring_hash/ring_hash.cc +112 -47
- data/src/core/load_balancing/rls/rls.cc +53 -29
- data/src/core/load_balancing/weighted_round_robin/weighted_round_robin.cc +146 -88
- data/src/core/load_balancing/weighted_round_robin/weighted_round_robin.h +86 -0
- data/src/core/load_balancing/xds/cds.cc +88 -61
- data/src/core/load_balancing/xds/cds.h +21 -0
- data/src/core/load_balancing/xds/xds_cluster_impl.cc +2 -3
- data/src/core/load_balancing/xds/xds_override_host.cc +10 -10
- data/src/core/mitigation_engine/mitigation.h +62 -0
- data/src/core/mitigation_engine/mitigation_engine.h +109 -0
- data/src/core/mitigation_engine/mitigation_provider.h +63 -0
- data/src/core/plugin_registry/grpc_plugin_registry.cc +41 -10
- data/src/core/plugin_registry/grpc_plugin_registry_extra.cc +0 -5
- data/src/core/resolver/dns/{event_engine/event_engine_client_channel_resolver.cc → dns_resolver.cc} +49 -48
- data/src/core/resolver/dns/{event_engine/event_engine_client_channel_resolver.h → dns_resolver.h} +8 -5
- data/src/core/resolver/dns/{event_engine/service_config_helper.cc → service_config_helper.cc} +1 -1
- data/src/core/resolver/dns/{event_engine/service_config_helper.h → service_config_helper.h} +3 -3
- data/src/core/resolver/endpoint_addresses.h +3 -0
- data/src/core/resolver/fake/fake_resolver.cc +5 -5
- data/src/core/resolver/google_c2p/google_c2p_resolver.cc +40 -31
- data/src/core/resolver/xds/xds_resolver.cc +66 -147
- data/src/core/server/server.cc +72 -54
- data/src/core/server/server.h +30 -21
- data/src/core/server/server_config_selector.h +23 -7
- data/src/core/server/server_config_selector_filter.cc +228 -32
- data/src/core/server/server_config_selector_filter.h +59 -3
- data/src/core/server/xds_server_config_fetcher.cc +821 -759
- data/src/core/server/xds_server_config_fetcher.h +49 -0
- data/src/core/server/xds_server_config_fetcher_legacy.cc +1340 -0
- data/src/core/telemetry/call_tracer.cc +49 -2
- data/src/core/telemetry/call_tracer.h +1 -0
- data/src/core/telemetry/default_tcp_tracer.cc +1 -1
- data/src/core/telemetry/histogram.h +99 -98
- data/src/core/telemetry/instrument.cc +209 -90
- data/src/core/telemetry/instrument.h +123 -61
- data/src/core/telemetry/metrics.h +5 -0
- data/src/core/telemetry/tcp_tracer.h +38 -0
- data/src/core/{resolver/dns/c_ares/dns_resolver_ares.h → telemetry/telemetry_label.h} +11 -9
- data/src/core/transport/message_size_service_config.cc +123 -0
- data/src/core/transport/message_size_service_config.h +85 -0
- data/src/core/transport/session_endpoint.cc +29 -4
- data/src/core/transport/session_endpoint.h +4 -0
- data/src/core/tsi/alts/crypt/aes_gcm.cc +10 -13
- data/src/core/tsi/alts/crypt/gsec.h +4 -2
- data/src/core/tsi/alts/handshaker/alts_handshaker_client.cc +4 -4
- data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc +6 -6
- data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.h +5 -3
- data/src/core/tsi/alts/handshaker/alts_tsi_utils.h +1 -1
- data/src/core/tsi/alts/handshaker/transport_security_common_api.h +1 -1
- data/src/core/tsi/ssl/key_logging/ssl_key_logging.cc +5 -5
- data/src/core/tsi/ssl/session_cache/ssl_session_cache.cc +3 -3
- data/src/core/tsi/ssl_telemetry_utils.cc +300 -0
- data/src/core/tsi/ssl_telemetry_utils.h +84 -0
- data/src/core/tsi/ssl_transport_security.cc +846 -377
- data/src/core/tsi/ssl_transport_security.h +81 -28
- data/src/core/tsi/ssl_transport_security_utils.cc +18 -6
- data/src/core/tsi/tls_telemetry.cc +31 -0
- data/src/core/tsi/tls_telemetry.h +47 -0
- data/src/core/tsi/transport_security.cc +2 -2
- data/src/core/tsi/transport_security.h +8 -1
- data/src/core/tsi/transport_security_interface.h +1 -1
- data/src/core/{resolver/dns/native/dns_resolver.h → util/address_sorting_init.cc} +21 -8
- data/src/core/{resolver/dns/c_ares/grpc_ares_wrapper_posix.cc → util/address_sorting_init.h} +7 -8
- data/src/core/util/event_log.cc +3 -3
- data/src/core/util/http_client/httpcli.cc +21 -61
- data/src/core/util/http_client/httpcli.h +1 -8
- data/src/core/util/http_client/httpcli_security_connector.cc +14 -8
- data/src/core/util/http_client/parser.cc +1 -1
- data/src/core/util/json/json_object_loader.cc +7 -0
- data/src/core/util/json/json_object_loader.h +17 -2
- data/src/core/util/latent_see.cc +123 -36
- data/src/core/util/latent_see.h +14 -1
- data/src/core/util/linux/cpu.cc +1 -1
- data/src/core/util/load_file.cc +3 -9
- data/src/core/util/load_file.h +3 -4
- data/src/core/util/lru_cache.h +2 -0
- data/src/core/util/matchers.h +8 -0
- data/src/core/util/mpscq.cc +1 -1
- data/src/core/util/notification.h +4 -4
- data/src/core/util/posix/cpu.cc +1 -1
- data/src/core/util/ref_counted_string.h +1 -1
- data/src/core/util/status_helper.cc +68 -209
- data/src/core/util/status_helper.h +18 -34
- data/src/core/util/sync.h +20 -6
- data/src/core/util/table.h +20 -22
- data/src/core/util/tchar.cc +13 -7
- data/src/core/util/trie_lookup.h +1 -1
- data/src/core/util/work_serializer.cc +2 -2
- data/src/core/xds/grpc/blackboard.cc +59 -0
- data/src/core/{filter → xds/grpc}/blackboard.h +30 -11
- data/src/core/xds/grpc/certificate_provider_store.cc +2 -2
- data/src/core/xds/grpc/file_watcher_certificate_provider_factory.cc +2 -11
- data/src/core/xds/grpc/streaming_call_promise_wrapper.cc +181 -0
- data/src/core/xds/grpc/streaming_call_promise_wrapper.h +213 -0
- data/src/core/xds/grpc/xds_audit_logger_registry.cc +51 -31
- data/src/core/xds/grpc/xds_audit_logger_registry.h +17 -3
- data/src/core/xds/grpc/xds_bootstrap_grpc.cc +4 -17
- data/src/core/xds/grpc/xds_bootstrap_grpc.h +8 -6
- data/src/core/xds/grpc/xds_bootstrap_grpc_builder.cc +488 -0
- data/src/core/xds/grpc/xds_bootstrap_grpc_builder.h +97 -0
- data/src/core/xds/grpc/xds_certificate_provider.cc +7 -7
- data/src/core/xds/grpc/xds_client_grpc.cc +12 -16
- data/src/core/xds/grpc/xds_client_grpc.h +0 -4
- data/src/core/xds/grpc/xds_cluster.h +1 -0
- data/src/core/xds/grpc/xds_cluster_parser.cc +5 -20
- data/src/core/xds/grpc/xds_cluster_parser.h +0 -2
- data/src/core/xds/grpc/xds_cluster_specifier_plugin.cc +2 -4
- data/src/core/xds/grpc/xds_cluster_specifier_plugin.h +0 -2
- data/src/core/xds/grpc/xds_common_types.cc +96 -91
- data/src/core/xds/grpc/xds_common_types.h +36 -54
- data/src/core/xds/grpc/xds_common_types_parser.cc +191 -414
- data/src/core/xds/grpc/xds_common_types_parser.h +25 -10
- data/src/core/xds/grpc/xds_endpoint.cc +1 -1
- data/src/core/xds/grpc/xds_endpoint_parser.cc +18 -20
- data/src/core/xds/grpc/xds_grpc_service_parser.cc +179 -0
- data/src/core/{filter/blackboard.cc → xds/grpc/xds_grpc_service_parser.h} +14 -13
- data/src/core/xds/grpc/xds_http_composite_filter.cc +53 -32
- data/src/core/xds/grpc/xds_http_composite_filter.h +10 -6
- data/src/core/xds/grpc/xds_http_ext_proc_filter.cc +421 -0
- data/src/core/xds/grpc/xds_http_ext_proc_filter.h +89 -0
- data/src/core/xds/grpc/xds_http_fault_filter.cc +9 -161
- data/src/core/xds/grpc/xds_http_fault_filter.h +20 -12
- data/src/core/xds/grpc/xds_http_filter.cc +4 -2
- data/src/core/xds/grpc/xds_http_filter.h +11 -20
- data/src/core/xds/grpc/xds_http_filter_registry.cc +10 -137
- data/src/core/xds/grpc/xds_http_filter_registry.h +7 -59
- data/src/core/xds/grpc/xds_http_gcp_authn_filter.cc +36 -131
- data/src/core/xds/grpc/xds_http_gcp_authn_filter.h +30 -17
- data/src/core/xds/grpc/xds_http_rbac_filter.cc +406 -37
- data/src/core/xds/grpc/xds_http_rbac_filter.h +1 -3
- data/src/core/xds/grpc/xds_http_stateful_session_filter.cc +8 -162
- data/src/core/xds/grpc/xds_http_stateful_session_filter.h +20 -12
- data/src/core/xds/grpc/xds_lb_policy_registry.cc +0 -274
- data/src/core/xds/grpc/xds_lb_policy_registry.h +7 -3
- data/src/core/xds/grpc/xds_listener.cc +2 -0
- data/src/core/xds/grpc/xds_listener.h +5 -0
- data/src/core/xds/grpc/xds_listener_parser.cc +28 -19
- data/src/core/xds/grpc/xds_matcher.h +2 -2
- data/src/core/xds/grpc/xds_matcher_parse.h +3 -1
- data/src/core/xds/grpc/xds_metadata_parser.cc +6 -3
- data/src/core/xds/grpc/xds_metadata_parser.h +2 -0
- data/src/core/xds/grpc/xds_route_config.cc +2 -0
- data/src/core/xds/grpc/xds_route_config.h +4 -2
- data/src/core/xds/grpc/xds_route_config_parser.cc +21 -93
- data/src/core/xds/grpc/xds_route_config_parser.h +0 -3
- data/src/core/xds/grpc/xds_routing.cc +192 -120
- data/src/core/xds/grpc/xds_routing.h +92 -32
- data/src/core/xds/grpc/xds_server_grpc.cc +22 -13
- data/src/core/xds/grpc/xds_server_grpc.h +16 -2
- data/src/core/xds/grpc/xds_server_grpc_interface.h +10 -0
- data/src/core/xds/grpc/xds_tls_context.cc +117 -0
- data/src/core/xds/grpc/xds_tls_context.h +76 -0
- data/src/core/xds/grpc/xds_tls_context_parser.cc +275 -0
- data/src/core/xds/grpc/xds_tls_context_parser.h +35 -0
- data/src/core/xds/grpc/xds_transport_grpc.cc +243 -95
- data/src/core/xds/grpc/xds_transport_grpc.h +50 -9
- data/src/core/xds/xds_client/lrs_client.cc +26 -27
- data/src/core/xds/xds_client/xds_bootstrap.cc +4 -16
- data/src/core/xds/xds_client/xds_client.cc +21 -31
- data/src/core/xds/xds_client/xds_transport.h +52 -3
- data/src/ruby/ext/grpc/rb_byte_buffer.c +1 -0
- data/src/ruby/ext/grpc/rb_call.c +29 -15
- data/src/ruby/ext/grpc/rb_call_credentials.c +1 -0
- data/src/ruby/ext/grpc/rb_channel.c +1 -0
- data/src/ruby/ext/grpc/rb_channel_args.c +1 -0
- data/src/ruby/ext/grpc/rb_channel_credentials.c +1 -0
- data/src/ruby/ext/grpc/rb_completion_queue.c +7 -5
- data/src/ruby/ext/grpc/rb_compression_options.c +1 -0
- data/src/ruby/ext/grpc/rb_grpc_imports.generated.c +8 -4
- data/src/ruby/ext/grpc/rb_grpc_imports.generated.h +12 -6
- data/src/ruby/ext/grpc/rb_server.c +1 -0
- data/src/ruby/ext/grpc/rb_server_credentials.c +1 -0
- data/src/ruby/ext/grpc/rb_xds_channel_credentials.c +1 -0
- data/src/ruby/ext/grpc/rb_xds_server_credentials.c +1 -0
- data/src/ruby/lib/grpc/core/call_credentials.rb +86 -0
- data/src/ruby/lib/grpc/core/channel_credentials.rb +69 -0
- data/src/ruby/lib/grpc/core/credentials_helper.rb +126 -0
- data/src/ruby/lib/grpc/generic/client_stub.rb +86 -73
- data/src/ruby/lib/grpc/generic/interceptors.rb +1 -1
- data/src/ruby/lib/grpc/version.rb +1 -1
- data/src/ruby/lib/grpc.rb +25 -0
- data/src/ruby/pb/README.md +1 -1
- data/src/ruby/pb/generate_proto_ruby.sh +1 -1
- data/src/ruby/pb/src/proto/grpc/testing/messages_pb.rb +1 -1
- data/src/ruby/pb/test/client.rb +5 -4
- data/src/ruby/spec/call_credentials_spec.rb +52 -2
- data/src/ruby/spec/call_spec.rb +14 -0
- data/src/ruby/spec/credentials_helper_spec.rb +80 -0
- data/src/ruby/spec/generic/client_stub_spec.rb +27 -4
- data/src/ruby/spec/generic/server_interceptors_spec.rb +14 -3
- data/third_party/abseil-cpp/absl/algorithm/algorithm.h +34 -2
- data/third_party/abseil-cpp/absl/algorithm/container.h +345 -147
- data/third_party/abseil-cpp/absl/base/attributes.h +67 -44
- data/third_party/abseil-cpp/absl/base/call_once.h +1 -0
- data/third_party/abseil-cpp/absl/base/casts.cc +61 -0
- data/third_party/abseil-cpp/absl/base/casts.h +135 -2
- data/third_party/abseil-cpp/absl/base/config.h +63 -41
- data/third_party/abseil-cpp/absl/base/fast_type_id.h +30 -2
- data/third_party/abseil-cpp/absl/base/internal/dynamic_annotations.h +1 -1
- data/third_party/abseil-cpp/absl/base/internal/hardening.h +136 -0
- data/third_party/abseil-cpp/absl/base/internal/iterator_traits.h +6 -2
- data/third_party/abseil-cpp/absl/base/internal/low_level_alloc.cc +39 -4
- data/third_party/abseil-cpp/absl/base/internal/low_level_alloc.h +6 -0
- data/third_party/abseil-cpp/absl/base/internal/low_level_scheduling.h +77 -15
- data/third_party/abseil-cpp/absl/base/internal/raw_logging.cc +3 -4
- data/third_party/abseil-cpp/absl/base/internal/spinlock.cc +26 -24
- data/third_party/abseil-cpp/absl/base/internal/spinlock.h +74 -29
- data/third_party/abseil-cpp/absl/base/internal/sysinfo.cc +1 -11
- data/third_party/abseil-cpp/absl/base/internal/thread_identity.h +52 -0
- data/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.cc +5 -1
- data/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.h +5 -0
- data/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock_config.h +1 -1
- data/third_party/abseil-cpp/absl/base/macros.h +76 -37
- data/third_party/abseil-cpp/absl/base/nullability.h +5 -5
- data/third_party/abseil-cpp/absl/base/optimization.h +4 -5
- data/third_party/abseil-cpp/absl/base/options.h +46 -18
- data/third_party/abseil-cpp/absl/base/policy_checks.h +5 -5
- data/third_party/abseil-cpp/absl/base/{internal/throw_delegate.cc → throw_delegate.cc} +9 -7
- data/third_party/abseil-cpp/absl/base/{internal/throw_delegate.h → throw_delegate.h} +4 -14
- data/third_party/abseil-cpp/absl/cleanup/cleanup.h +7 -2
- data/third_party/abseil-cpp/absl/cleanup/internal/cleanup.h +3 -2
- data/third_party/abseil-cpp/absl/container/btree_map.h +60 -10
- data/third_party/abseil-cpp/absl/container/btree_set.h +61 -15
- data/third_party/abseil-cpp/absl/container/fixed_array.h +19 -21
- data/third_party/abseil-cpp/absl/container/flat_hash_map.h +49 -27
- data/third_party/abseil-cpp/absl/container/flat_hash_set.h +50 -26
- data/third_party/abseil-cpp/absl/container/inlined_vector.h +42 -36
- data/third_party/abseil-cpp/absl/container/internal/btree.h +32 -24
- data/third_party/abseil-cpp/absl/container/internal/btree_container.h +30 -22
- data/third_party/abseil-cpp/absl/container/internal/common.h +57 -5
- data/third_party/abseil-cpp/absl/container/internal/common_policy_traits.h +1 -1
- data/third_party/abseil-cpp/absl/container/internal/compressed_tuple.h +40 -36
- data/third_party/abseil-cpp/absl/container/internal/container_memory.h +119 -39
- data/third_party/abseil-cpp/absl/container/internal/hash_function_defaults.h +14 -2
- data/third_party/abseil-cpp/absl/container/internal/hash_policy_traits.h +14 -22
- data/third_party/abseil-cpp/absl/container/internal/hashtable_control_bytes.h +52 -52
- data/third_party/abseil-cpp/absl/container/internal/hashtablez_sampler.cc +7 -7
- data/third_party/abseil-cpp/absl/container/internal/hashtablez_sampler.h +7 -7
- data/third_party/abseil-cpp/absl/container/internal/inlined_vector.h +32 -40
- data/third_party/abseil-cpp/absl/container/internal/layout.h +13 -13
- data/third_party/abseil-cpp/absl/container/internal/raw_hash_map.h +95 -72
- data/third_party/abseil-cpp/absl/container/internal/raw_hash_set.cc +633 -365
- data/third_party/abseil-cpp/absl/container/internal/raw_hash_set.h +1016 -749
- data/third_party/abseil-cpp/absl/container/internal/raw_hash_set_resize_impl.h +0 -1
- data/third_party/abseil-cpp/absl/container/node_hash_map.h +58 -35
- data/third_party/abseil-cpp/absl/crc/internal/cpu_detect.cc +23 -6
- data/third_party/abseil-cpp/absl/crc/internal/cpu_detect.h +7 -1
- data/third_party/abseil-cpp/absl/crc/internal/crc.cc +4 -6
- data/third_party/abseil-cpp/absl/crc/internal/crc32_x86_arm_combined_simd.h +41 -0
- data/third_party/abseil-cpp/absl/crc/internal/crc_internal.h +0 -16
- data/third_party/abseil-cpp/absl/crc/internal/crc_memcpy_x86_arm_combined.cc +5 -0
- data/third_party/abseil-cpp/absl/crc/internal/crc_x86_arm_combined.cc +304 -188
- data/third_party/abseil-cpp/absl/crc/internal/non_temporal_arm_intrinsics.h +4 -2
- data/third_party/abseil-cpp/absl/debugging/internal/demangle.cc +2 -2
- data/third_party/abseil-cpp/absl/debugging/internal/demangle_rust.h +8 -0
- data/third_party/abseil-cpp/absl/debugging/internal/elf_mem_image.h +4 -4
- data/third_party/abseil-cpp/absl/debugging/internal/examine_stack.cc +15 -1
- data/third_party/abseil-cpp/absl/debugging/internal/examine_stack.h +7 -1
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_aarch64-inl.inc +12 -1
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_config.h +6 -5
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_emscripten-inl.inc +13 -11
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_generic-inl.inc +14 -7
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_powerpc-inl.inc +3 -2
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_riscv-inl.inc +6 -1
- data/third_party/abseil-cpp/absl/debugging/internal/stacktrace_x86-inl.inc +14 -8
- data/third_party/abseil-cpp/absl/debugging/internal/symbolize.h +48 -38
- data/third_party/abseil-cpp/absl/debugging/internal/vdso_support.cc +4 -0
- data/third_party/abseil-cpp/absl/debugging/stacktrace.cc +63 -118
- data/third_party/abseil-cpp/absl/debugging/stacktrace.h +7 -47
- data/third_party/abseil-cpp/absl/debugging/symbolize.cc +20 -2
- data/third_party/abseil-cpp/absl/debugging/symbolize_elf.inc +83 -149
- data/third_party/abseil-cpp/absl/debugging/symbolize_emscripten.inc +4 -17
- data/third_party/abseil-cpp/absl/debugging/symbolize_unimplemented.inc +4 -4
- data/third_party/abseil-cpp/absl/debugging/symbolize_win32.inc +2 -4
- data/third_party/abseil-cpp/absl/flags/commandlineflag.h +8 -6
- data/third_party/abseil-cpp/absl/flags/declare.h +9 -0
- data/third_party/abseil-cpp/absl/flags/flag.h +2 -1
- data/third_party/abseil-cpp/absl/flags/internal/commandlineflag.h +1 -1
- data/third_party/abseil-cpp/absl/flags/internal/flag.cc +19 -18
- data/third_party/abseil-cpp/absl/flags/internal/flag.h +33 -34
- data/third_party/abseil-cpp/absl/flags/internal/program_name.cc +2 -2
- data/third_party/abseil-cpp/absl/flags/marshalling.cc +1 -16
- data/third_party/abseil-cpp/absl/flags/marshalling.h +2 -28
- data/third_party/abseil-cpp/absl/flags/reflection.cc +11 -7
- data/third_party/abseil-cpp/absl/flags/usage_config.cc +2 -2
- data/third_party/abseil-cpp/absl/functional/any_invocable.h +22 -19
- data/third_party/abseil-cpp/absl/functional/bind_front.h +7 -1
- data/third_party/abseil-cpp/absl/functional/function_ref.h +125 -20
- data/third_party/abseil-cpp/absl/functional/internal/any_invocable.h +43 -31
- data/third_party/abseil-cpp/absl/functional/internal/front_binder.h +4 -4
- data/third_party/abseil-cpp/absl/functional/internal/function_ref.h +44 -6
- data/third_party/abseil-cpp/absl/hash/hash.h +1 -1
- data/third_party/abseil-cpp/absl/hash/internal/city.cc +39 -51
- data/third_party/abseil-cpp/absl/hash/internal/hash.cc +379 -14
- data/third_party/abseil-cpp/absl/hash/internal/hash.h +457 -353
- data/third_party/abseil-cpp/absl/log/absl_vlog_is_on.h +0 -2
- data/third_party/abseil-cpp/absl/log/internal/check_impl.h +2 -1
- data/third_party/abseil-cpp/absl/log/internal/check_op.cc +4 -0
- data/third_party/abseil-cpp/absl/log/internal/check_op.h +128 -50
- data/third_party/abseil-cpp/absl/log/internal/conditions.h +38 -35
- data/third_party/abseil-cpp/absl/log/internal/log_impl.h +108 -110
- data/third_party/abseil-cpp/absl/log/internal/log_message.cc +10 -6
- data/third_party/abseil-cpp/absl/log/internal/log_message.h +19 -1
- data/third_party/abseil-cpp/absl/log/internal/log_sink_set.cc +4 -4
- data/third_party/abseil-cpp/absl/log/internal/nullstream.h +1 -1
- data/third_party/abseil-cpp/absl/log/internal/proto.cc +13 -0
- data/third_party/abseil-cpp/absl/log/internal/strip.h +30 -31
- data/third_party/abseil-cpp/absl/log/internal/structured_proto.cc +5 -5
- data/third_party/abseil-cpp/absl/log/internal/structured_proto.h +6 -5
- data/third_party/abseil-cpp/absl/log/internal/vlog_config.cc +30 -30
- data/third_party/abseil-cpp/absl/log/internal/vlog_config.h +0 -1
- data/third_party/abseil-cpp/absl/log/log.h +2 -2
- data/third_party/abseil-cpp/absl/log/log_entry.cc +263 -0
- data/third_party/abseil-cpp/absl/log/log_entry.h +2 -0
- data/third_party/abseil-cpp/absl/log/vlog_is_on.h +0 -2
- data/third_party/abseil-cpp/absl/memory/memory.h +55 -5
- data/third_party/abseil-cpp/absl/meta/type_traits.h +161 -56
- data/third_party/abseil-cpp/absl/numeric/int128.h +41 -21
- data/third_party/abseil-cpp/absl/numeric/int128_have_intrinsic.inc +16 -22
- data/third_party/abseil-cpp/absl/numeric/int128_no_intrinsic.inc +5 -7
- data/third_party/abseil-cpp/absl/numeric/internal/bits.h +32 -4
- data/third_party/abseil-cpp/absl/profiling/internal/sample_recorder.h +9 -9
- data/third_party/abseil-cpp/absl/random/beta_distribution.h +2 -2
- data/third_party/abseil-cpp/absl/random/bit_gen_ref.h +26 -53
- data/third_party/abseil-cpp/absl/random/discrete_distribution.h +1 -1
- data/third_party/abseil-cpp/absl/random/distributions.h +17 -17
- data/third_party/abseil-cpp/absl/random/exponential_distribution.h +1 -1
- data/third_party/abseil-cpp/absl/random/internal/distribution_caller.h +8 -21
- data/third_party/abseil-cpp/absl/random/internal/entropy_pool.cc +2 -2
- data/third_party/abseil-cpp/absl/random/internal/fast_uniform_bits.h +1 -1
- data/third_party/abseil-cpp/absl/random/internal/generate_real.h +1 -1
- data/third_party/abseil-cpp/absl/random/internal/iostream_state_saver.h +2 -2
- data/third_party/abseil-cpp/absl/random/internal/nonsecure_base.h +2 -2
- data/third_party/abseil-cpp/absl/random/internal/pcg_engine.h +6 -6
- data/third_party/abseil-cpp/absl/random/internal/platform.h +0 -13
- data/third_party/abseil-cpp/absl/random/internal/randen_detect.cc +6 -6
- data/third_party/abseil-cpp/absl/random/internal/randen_engine.h +2 -2
- data/third_party/abseil-cpp/absl/random/internal/salted_seed_seq.h +6 -5
- data/third_party/abseil-cpp/absl/random/internal/seed_material.cc +5 -31
- data/third_party/abseil-cpp/absl/random/internal/seed_material.h +2 -1
- data/third_party/abseil-cpp/absl/random/internal/traits.h +21 -0
- data/third_party/abseil-cpp/absl/random/internal/uniform_helper.h +23 -23
- data/third_party/abseil-cpp/absl/random/mocking_access.h +74 -0
- data/third_party/abseil-cpp/absl/random/uniform_real_distribution.h +1 -1
- data/third_party/abseil-cpp/absl/status/internal/status_internal.cc +63 -18
- data/third_party/abseil-cpp/absl/status/internal/status_internal.h +30 -4
- data/third_party/abseil-cpp/absl/status/internal/statusor_internal.h +225 -63
- data/third_party/abseil-cpp/absl/status/status.cc +66 -70
- data/third_party/abseil-cpp/absl/status/status.h +254 -23
- data/third_party/abseil-cpp/absl/status/status_payload_printer.h +3 -2
- data/third_party/abseil-cpp/absl/status/statusor.h +117 -137
- data/third_party/abseil-cpp/absl/strings/ascii.h +10 -6
- data/third_party/abseil-cpp/absl/strings/cord.cc +41 -17
- data/third_party/abseil-cpp/absl/strings/cord.h +26 -17
- data/third_party/abseil-cpp/absl/strings/cord_buffer.h +4 -2
- data/third_party/abseil-cpp/absl/strings/escaping.cc +305 -125
- data/third_party/abseil-cpp/absl/strings/escaping.h +12 -2
- data/third_party/abseil-cpp/absl/strings/internal/append_and_overwrite.h +93 -0
- data/third_party/abseil-cpp/absl/strings/internal/cord_internal.h +2 -2
- data/third_party/abseil-cpp/absl/strings/internal/cordz_handle.cc +6 -6
- data/third_party/abseil-cpp/absl/strings/internal/cordz_info.cc +27 -21
- data/third_party/abseil-cpp/absl/strings/internal/cordz_info.h +11 -19
- data/third_party/abseil-cpp/absl/strings/internal/damerau_levenshtein_distance.cc +6 -0
- data/third_party/abseil-cpp/absl/strings/internal/damerau_levenshtein_distance.h +1 -0
- data/third_party/abseil-cpp/absl/strings/internal/escaping.cc +0 -141
- data/third_party/abseil-cpp/absl/strings/internal/escaping.h +2 -24
- data/third_party/abseil-cpp/absl/strings/internal/resize_uninitialized.h +31 -36
- data/third_party/abseil-cpp/absl/strings/internal/stl_type_traits.h +39 -39
- data/third_party/abseil-cpp/absl/strings/internal/str_format/arg.h +14 -22
- data/third_party/abseil-cpp/absl/strings/internal/str_format/bind.h +2 -2
- data/third_party/abseil-cpp/absl/strings/internal/str_format/checker.h +2 -4
- data/third_party/abseil-cpp/absl/strings/internal/str_format/float_conversion.cc +921 -231
- data/third_party/abseil-cpp/absl/strings/internal/str_join_internal.h +18 -16
- data/third_party/abseil-cpp/absl/strings/internal/str_split_internal.h +16 -12
- data/third_party/abseil-cpp/absl/strings/internal/stringify_sink.h +12 -0
- data/third_party/abseil-cpp/absl/strings/numbers.cc +477 -8
- data/third_party/abseil-cpp/absl/strings/numbers.h +29 -12
- data/third_party/abseil-cpp/absl/strings/resize_and_overwrite.h +198 -0
- data/third_party/abseil-cpp/absl/strings/str_cat.cc +96 -91
- data/third_party/abseil-cpp/absl/strings/str_cat.h +53 -13
- data/third_party/abseil-cpp/absl/strings/str_split.h +14 -9
- data/third_party/abseil-cpp/absl/strings/string_view.h +10 -716
- data/third_party/abseil-cpp/absl/strings/substitute.cc +24 -24
- data/third_party/abseil-cpp/absl/strings/substitute.h +2 -2
- data/third_party/abseil-cpp/absl/synchronization/barrier.cc +1 -1
- data/third_party/abseil-cpp/absl/synchronization/blocking_counter.cc +2 -2
- data/third_party/abseil-cpp/absl/synchronization/internal/create_thread_identity.cc +24 -3
- data/third_party/abseil-cpp/absl/synchronization/internal/graphcycles.cc +30 -33
- data/third_party/abseil-cpp/absl/synchronization/internal/kernel_timeout.h +2 -2
- data/third_party/abseil-cpp/absl/synchronization/internal/per_thread_sem.h +5 -0
- data/third_party/abseil-cpp/absl/synchronization/mutex.cc +41 -29
- data/third_party/abseil-cpp/absl/synchronization/mutex.h +199 -94
- data/third_party/abseil-cpp/absl/synchronization/notification.cc +5 -5
- data/third_party/abseil-cpp/absl/synchronization/notification.h +1 -1
- data/third_party/abseil-cpp/absl/time/clock.cc +29 -30
- data/third_party/abseil-cpp/absl/time/clock.h +3 -0
- data/third_party/abseil-cpp/absl/time/duration.cc +2 -2
- data/third_party/abseil-cpp/absl/time/format.cc +3 -10
- data/third_party/abseil-cpp/absl/time/internal/cctz/include/cctz/civil_time_detail.h +12 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_format.cc +131 -91
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_lookup.cc +6 -103
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_name_win.cc +185 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/time_zone_name_win.h +37 -0
- data/third_party/abseil-cpp/absl/time/internal/cctz/src/tzfile.h +10 -15
- data/third_party/abseil-cpp/absl/time/time.cc +4 -4
- data/third_party/abseil-cpp/absl/time/time.h +14 -13
- data/third_party/abseil-cpp/absl/types/compare.h +64 -63
- data/third_party/abseil-cpp/absl/types/internal/span.h +6 -6
- data/third_party/abseil-cpp/absl/types/optional.h +31 -4
- data/third_party/abseil-cpp/absl/types/optional_ref.h +295 -0
- data/third_party/{boringssl-with-bazel/crypto/x509/x_val.cc → abseil-cpp/absl/types/source_location.cc} +4 -14
- data/third_party/abseil-cpp/absl/types/source_location.h +172 -0
- data/third_party/abseil-cpp/absl/types/span.h +67 -38
- data/third_party/abseil-cpp/absl/types/variant.h +75 -18
- data/third_party/abseil-cpp/absl/utility/utility.h +112 -16
- data/third_party/boringssl-with-bazel/crypto/aes/aes.cc +3 -0
- data/third_party/boringssl-with-bazel/crypto/armv8_feature_parsing.h +67 -0
- data/third_party/boringssl-with-bazel/crypto/asn1/a_bitstr.cc +143 -105
- data/third_party/boringssl-with-bazel/crypto/asn1/a_bool.cc +5 -8
- data/third_party/boringssl-with-bazel/crypto/asn1/a_d2i_fp.cc +3 -3
- data/third_party/boringssl-with-bazel/crypto/asn1/a_dup.cc +6 -6
- data/third_party/boringssl-with-bazel/crypto/asn1/a_gentm.cc +33 -12
- data/third_party/boringssl-with-bazel/crypto/asn1/a_i2d_fp.cc +7 -6
- data/third_party/boringssl-with-bazel/crypto/asn1/a_int.cc +80 -52
- data/third_party/boringssl-with-bazel/crypto/asn1/a_mbstr.cc +7 -4
- data/third_party/boringssl-with-bazel/crypto/asn1/a_object.cc +70 -72
- data/third_party/boringssl-with-bazel/crypto/asn1/a_strex.cc +38 -42
- data/third_party/boringssl-with-bazel/crypto/asn1/a_strnid.cc +41 -39
- data/third_party/boringssl-with-bazel/crypto/asn1/a_time.cc +59 -35
- data/third_party/boringssl-with-bazel/crypto/asn1/a_type.cc +275 -15
- data/third_party/boringssl-with-bazel/crypto/asn1/a_utctm.cc +32 -13
- data/third_party/boringssl-with-bazel/crypto/asn1/asn1_lib.cc +128 -30
- data/third_party/boringssl-with-bazel/crypto/asn1/asn_pack.cc +10 -10
- data/third_party/boringssl-with-bazel/crypto/asn1/f_int.cc +1 -1
- data/third_party/boringssl-with-bazel/crypto/asn1/f_string.cc +1 -1
- data/third_party/boringssl-with-bazel/crypto/asn1/internal.h +261 -115
- data/third_party/boringssl-with-bazel/crypto/asn1/posix_time.cc +8 -5
- data/third_party/boringssl-with-bazel/crypto/asn1/tasn_dec.cc +373 -725
- data/third_party/boringssl-with-bazel/crypto/asn1/tasn_enc.cc +211 -526
- data/third_party/boringssl-with-bazel/crypto/asn1/tasn_fre.cc +22 -19
- data/third_party/boringssl-with-bazel/crypto/asn1/tasn_new.cc +26 -24
- data/third_party/boringssl-with-bazel/crypto/asn1/tasn_typ.cc +19 -5
- data/third_party/boringssl-with-bazel/crypto/asn1/tasn_utl.cc +47 -51
- data/third_party/boringssl-with-bazel/crypto/base64/base64.cc +14 -15
- data/third_party/boringssl-with-bazel/crypto/bcm_support.h +7 -29
- data/third_party/boringssl-with-bazel/crypto/bio/bio.cc +234 -176
- data/third_party/boringssl-with-bazel/crypto/bio/bio_mem.cc +72 -86
- data/third_party/boringssl-with-bazel/crypto/bio/connect.cc +153 -199
- data/third_party/boringssl-with-bazel/crypto/bio/errno.cc +3 -1
- data/third_party/boringssl-with-bazel/crypto/bio/fd.cc +56 -55
- data/third_party/boringssl-with-bazel/crypto/bio/file.cc +70 -78
- data/third_party/boringssl-with-bazel/crypto/bio/hexdump.cc +6 -4
- data/third_party/boringssl-with-bazel/crypto/bio/internal.h +69 -17
- data/third_party/boringssl-with-bazel/crypto/bio/pair.cc +117 -136
- data/third_party/boringssl-with-bazel/crypto/bio/printf.cc +1 -1
- data/third_party/boringssl-with-bazel/crypto/bio/socket.cc +116 -50
- data/third_party/boringssl-with-bazel/crypto/bio/socket_helper.cc +53 -5
- data/third_party/boringssl-with-bazel/crypto/blake2/blake2.cc +9 -5
- data/third_party/boringssl-with-bazel/crypto/bn/bn_asn1.cc +2 -2
- data/third_party/boringssl-with-bazel/crypto/bn/convert.cc +56 -70
- data/third_party/boringssl-with-bazel/crypto/bn/div.cc +102 -0
- data/third_party/boringssl-with-bazel/crypto/bn/exponentiation.cc +26 -42
- data/third_party/boringssl-with-bazel/crypto/bn/sqrt.cc +93 -0
- data/third_party/boringssl-with-bazel/crypto/buf/buf.cc +6 -5
- data/third_party/boringssl-with-bazel/crypto/bytestring/asn1_compat.cc +6 -5
- data/third_party/boringssl-with-bazel/crypto/bytestring/ber.cc +22 -20
- data/third_party/boringssl-with-bazel/crypto/bytestring/cbb.cc +119 -59
- data/third_party/boringssl-with-bazel/crypto/bytestring/cbs.cc +115 -31
- data/third_party/boringssl-with-bazel/crypto/bytestring/internal.h +79 -24
- data/third_party/boringssl-with-bazel/crypto/bytestring/unicode.cc +2 -2
- data/third_party/boringssl-with-bazel/crypto/chacha/chacha.cc +5 -3
- data/third_party/boringssl-with-bazel/crypto/chacha/internal.h +23 -22
- data/third_party/boringssl-with-bazel/crypto/cipher/derive_key.cc +14 -18
- data/third_party/boringssl-with-bazel/crypto/cipher/e_aesctrhmac.cc +73 -58
- data/third_party/boringssl-with-bazel/crypto/cipher/e_aeseax.cc +132 -70
- data/third_party/boringssl-with-bazel/crypto/cipher/e_aesgcmsiv.cc +390 -249
- data/third_party/boringssl-with-bazel/crypto/cipher/e_chacha20poly1305.cc +200 -137
- data/third_party/boringssl-with-bazel/crypto/cipher/e_des.cc +45 -29
- data/third_party/boringssl-with-bazel/crypto/cipher/e_null.cc +9 -5
- data/third_party/boringssl-with-bazel/crypto/cipher/e_rc2.cc +43 -28
- data/third_party/boringssl-with-bazel/crypto/cipher/e_rc4.cc +7 -5
- data/third_party/boringssl-with-bazel/crypto/cipher/e_tls.cc +250 -237
- data/third_party/boringssl-with-bazel/crypto/cipher/get_cipher.cc +12 -12
- data/third_party/boringssl-with-bazel/crypto/cipher/internal.h +59 -59
- data/third_party/boringssl-with-bazel/crypto/cipher/tls_cbc.cc +111 -111
- data/third_party/boringssl-with-bazel/crypto/cms/cms.cc +48 -42
- data/third_party/boringssl-with-bazel/crypto/conf/conf.cc +69 -63
- data/third_party/boringssl-with-bazel/crypto/conf/internal.h +11 -12
- data/third_party/boringssl-with-bazel/crypto/cpu_aarch64_apple.cc +8 -5
- data/third_party/boringssl-with-bazel/crypto/cpu_aarch64_fuchsia.cc +6 -1
- data/third_party/boringssl-with-bazel/crypto/cpu_aarch64_linux.cc +7 -1
- data/third_party/boringssl-with-bazel/crypto/cpu_aarch64_openbsd.cc +7 -21
- data/third_party/boringssl-with-bazel/crypto/cpu_aarch64_sysreg.cc +15 -41
- data/third_party/boringssl-with-bazel/crypto/cpu_aarch64_win.cc +16 -3
- data/third_party/boringssl-with-bazel/crypto/cpu_arm_freebsd.cc +4 -2
- data/third_party/boringssl-with-bazel/crypto/cpu_arm_linux.cc +54 -31
- data/third_party/boringssl-with-bazel/crypto/cpu_arm_linux.h +79 -101
- data/third_party/boringssl-with-bazel/crypto/cpu_intel.cc +51 -45
- data/third_party/boringssl-with-bazel/crypto/crypto.cc +26 -55
- data/third_party/boringssl-with-bazel/crypto/curve25519/curve25519.cc +28 -25
- data/third_party/boringssl-with-bazel/crypto/curve25519/curve25519_tables.h +6 -6
- data/third_party/boringssl-with-bazel/crypto/curve25519/internal.h +14 -15
- data/third_party/boringssl-with-bazel/crypto/curve25519/spake25519.cc +23 -20
- data/third_party/boringssl-with-bazel/crypto/des/des.cc +27 -19
- data/third_party/boringssl-with-bazel/crypto/des/internal.h +4 -9
- data/third_party/boringssl-with-bazel/crypto/dh/dh_asn1.cc +34 -49
- data/third_party/boringssl-with-bazel/crypto/dh/params.cc +44 -41
- data/third_party/boringssl-with-bazel/crypto/digest/digest_extra.cc +87 -40
- data/third_party/boringssl-with-bazel/crypto/dsa/dsa.cc +237 -260
- data/third_party/boringssl-with-bazel/crypto/dsa/dsa_asn1.cc +100 -173
- data/third_party/boringssl-with-bazel/crypto/dsa/internal.h +23 -21
- data/third_party/boringssl-with-bazel/crypto/ec/ec_asn1.cc +181 -209
- data/third_party/boringssl-with-bazel/crypto/ec/ec_derive.cc +26 -28
- data/third_party/boringssl-with-bazel/crypto/ec/hash_to_curve.cc +265 -174
- data/third_party/boringssl-with-bazel/crypto/ec/internal.h +54 -18
- data/third_party/boringssl-with-bazel/crypto/ecdh/ecdh.cc +7 -5
- data/third_party/boringssl-with-bazel/crypto/ecdsa/ecdsa_asn1.cc +50 -70
- data/third_party/boringssl-with-bazel/crypto/ecdsa/ecdsa_p1363.cc +54 -0
- data/third_party/boringssl-with-bazel/crypto/engine/engine.cc +7 -7
- data/third_party/boringssl-with-bazel/crypto/err/err.cc +116 -105
- data/third_party/boringssl-with-bazel/crypto/err/internal.h +8 -21
- data/third_party/boringssl-with-bazel/crypto/evp/evp.cc +238 -166
- data/third_party/boringssl-with-bazel/crypto/evp/evp_asn1.cc +202 -234
- data/third_party/boringssl-with-bazel/crypto/evp/evp_ctx.cc +260 -159
- data/third_party/boringssl-with-bazel/crypto/evp/evp_kem.cc +82 -0
- data/third_party/boringssl-with-bazel/crypto/evp/internal.h +292 -137
- data/third_party/boringssl-with-bazel/crypto/evp/p_dh.cc +198 -25
- data/third_party/boringssl-with-bazel/crypto/evp/p_dsa.cc +333 -0
- data/third_party/boringssl-with-bazel/crypto/evp/p_ec.cc +427 -42
- data/third_party/boringssl-with-bazel/crypto/evp/p_ed25519.cc +270 -14
- data/third_party/boringssl-with-bazel/crypto/evp/p_hkdf.cc +70 -102
- data/third_party/boringssl-with-bazel/crypto/evp/p_mldsa.cc +549 -0
- data/third_party/boringssl-with-bazel/crypto/evp/p_mlkem.cc +485 -0
- data/third_party/boringssl-with-bazel/crypto/evp/p_rsa.cc +666 -158
- data/third_party/boringssl-with-bazel/crypto/evp/p_x25519.cc +290 -28
- data/third_party/boringssl-with-bazel/crypto/evp/p_xwing.cc +273 -0
- data/third_party/boringssl-with-bazel/crypto/evp/pbkdf.cc +14 -7
- data/third_party/boringssl-with-bazel/crypto/evp/print.cc +34 -89
- data/third_party/boringssl-with-bazel/crypto/evp/scrypt.cc +23 -21
- data/third_party/boringssl-with-bazel/crypto/evp/sign.cc +23 -42
- data/third_party/boringssl-with-bazel/crypto/ex_data.cc +40 -41
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/aes/aes.cc.inc +34 -28
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/aes/aes_nohw.cc.inc +119 -121
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/aes/cbc.cc.inc +16 -14
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/aes/cfb.cc.inc +12 -10
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/aes/ctr.cc.inc +7 -5
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/aes/gcm.cc.inc +39 -29
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/aes/gcm_nohw.cc.inc +15 -13
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/aes/internal.h +193 -177
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/aes/key_wrap.cc.inc +5 -3
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/aes/mode_wrappers.cc.inc +7 -3
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/aes/ofb.cc.inc +7 -5
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/bcm.cc +24 -19
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/bcm_interface.h +512 -384
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/bn/add.cc.inc +7 -5
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/bn/asm/x86_64-gcc.cc.inc +63 -44
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/bn/bn.cc.inc +40 -37
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/bn/bytes.cc.inc +27 -22
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/bn/cmp.cc.inc +9 -7
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/bn/ctx.cc.inc +62 -126
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/bn/div.cc.inc +92 -167
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/bn/div_extra.cc.inc +15 -12
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/bn/exponentiation.cc.inc +96 -93
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/bn/gcd.cc.inc +73 -92
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/bn/gcd_extra.cc.inc +59 -71
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/bn/generic.cc.inc +54 -57
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/bn/internal.h +333 -255
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/bn/jacobi.cc.inc +12 -19
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/bn/montgomery.cc.inc +80 -95
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/bn/montgomery_inv.cc.inc +53 -96
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/bn/mul.cc.inc +58 -419
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/bn/prime.cc.inc +164 -213
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/bn/random.cc.inc +27 -26
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/bn/rsaz_exp.cc.inc +12 -10
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/bn/rsaz_exp.h +47 -49
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/bn/shift.cc.inc +14 -17
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/bn/sqrt.cc.inc +19 -108
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/cipher/aead.cc.inc +427 -105
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/cipher/cipher.cc.inc +412 -212
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/cipher/e_aes.cc.inc +230 -225
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/cipher/e_aesccm.cc.inc +115 -84
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/cipher/internal.h +374 -27
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/cmac/cmac.cc.inc +28 -23
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/delocate.h +36 -40
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/dh/check.cc.inc +68 -78
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/dh/dh.cc.inc +154 -196
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/dh/internal.h +24 -24
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/digest/digest.cc.inc +40 -69
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/digest/digests.cc.inc +13 -7
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/digest/internal.h +13 -11
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/digest/md32_common.h +86 -81
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/digestsign/digestsign.cc.inc +38 -34
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/ec/ec.cc.inc +187 -196
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/ec/ec_key.cc.inc +196 -154
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/ec/ec_montgomery.cc.inc +65 -125
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/ec/felem.cc.inc +85 -22
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/ec/internal.h +281 -287
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/ec/oct.cc.inc +23 -22
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/ec/p256.cc.inc +514 -573
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/ec/p256_internal.h +193 -0
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/ec/scalar.cc.inc +44 -39
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/ec/simple.cc.inc +58 -90
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/ec/simple_mul.cc.inc +39 -34
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/ec/util.cc.inc +6 -3
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/ec/wnaf.cc.inc +23 -20
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/ecdh/ecdh.cc.inc +6 -3
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/ecdsa/ecdsa.cc.inc +47 -37
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/ecdsa/internal.h +5 -10
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/entropy/internal.h +38 -0
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/entropy/jitter.cc.inc +463 -0
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/entropy/sha512.cc.inc +329 -0
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/hkdf/hkdf.cc.inc +8 -6
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/hmac/hmac.cc.inc +19 -16
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/keccak/internal.h +41 -15
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/keccak/keccak.cc.inc +172 -44
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/mldsa/fips_known_values.inc +5 -5
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/mldsa/mldsa.cc.inc +1632 -766
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/mlkem/fips_known_values.inc +5 -5
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/mlkem/mlkem.cc.inc +740 -436
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/rand/android_entropy_client.cc.inc +82 -0
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/rand/ctrdrbg.cc.inc +240 -53
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/rand/internal.h +41 -26
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/rand/rand.cc.inc +221 -218
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/rsa/internal.h +64 -67
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/rsa/padding.cc.inc +49 -57
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/rsa/rsa.cc.inc +247 -234
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/rsa/rsa_impl.cc.inc +392 -692
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/self_check/fips.cc.inc +10 -10
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/self_check/self_check.cc.inc +479 -449
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/service_indicator/internal.h +34 -11
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/service_indicator/service_indicator.cc.inc +46 -43
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/sha/internal.h +61 -70
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/sha/sha1.cc.inc +27 -13
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/sha/sha256.cc.inc +46 -30
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/sha/sha512.cc.inc +47 -47
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/slhdsa/address.h +98 -73
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/slhdsa/fors.cc.inc +108 -98
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/slhdsa/fors.h +14 -24
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/slhdsa/merkle.cc.inc +94 -91
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/slhdsa/merkle.h +19 -31
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/slhdsa/params.h +156 -56
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/slhdsa/slhdsa.cc.inc +318 -132
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/slhdsa/thash.cc.inc +234 -81
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/slhdsa/thash.h +20 -34
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/slhdsa/wots.cc.inc +97 -96
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/slhdsa/wots.h +10 -20
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/tls/internal.h +2 -16
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/tls/kdf.cc.inc +26 -26
- data/third_party/boringssl-with-bazel/crypto/fuzzer_mode.cc +5 -5
- data/third_party/boringssl-with-bazel/crypto/hpke/hpke.cc +461 -97
- data/third_party/boringssl-with-bazel/crypto/hrss/hrss.cc +153 -149
- data/third_party/boringssl-with-bazel/crypto/hrss/internal.h +9 -13
- data/third_party/boringssl-with-bazel/crypto/internal.h +531 -394
- data/third_party/boringssl-with-bazel/crypto/kyber/internal.h +117 -12
- data/third_party/boringssl-with-bazel/crypto/kyber/kyber.cc +59 -58
- data/third_party/boringssl-with-bazel/crypto/lhash/internal.h +38 -37
- data/third_party/boringssl-with-bazel/crypto/lhash/lhash.cc +68 -65
- data/third_party/boringssl-with-bazel/crypto/md4/md4.cc +19 -6
- data/third_party/boringssl-with-bazel/crypto/md5/internal.h +6 -9
- data/third_party/boringssl-with-bazel/crypto/md5/md5.cc +18 -6
- data/third_party/boringssl-with-bazel/crypto/mem.cc +61 -65
- data/third_party/boringssl-with-bazel/crypto/mem_internal.h +671 -0
- data/third_party/boringssl-with-bazel/crypto/mldsa/mldsa.cc +238 -32
- data/third_party/boringssl-with-bazel/crypto/mlkem/mlkem.cc +21 -65
- data/third_party/boringssl-with-bazel/crypto/obj/obj.cc +132 -157
- data/third_party/boringssl-with-bazel/crypto/obj/obj_dat.h +79 -1
- data/third_party/boringssl-with-bazel/crypto/obj/obj_xref.cc +14 -11
- data/third_party/boringssl-with-bazel/crypto/params_internal.h +30 -0
- data/third_party/boringssl-with-bazel/crypto/pem/internal.h +20 -15
- data/third_party/boringssl-with-bazel/crypto/pem/pem_all.cc +20 -19
- data/third_party/boringssl-with-bazel/crypto/pem/pem_info.cc +72 -76
- data/third_party/boringssl-with-bazel/crypto/pem/pem_lib.cc +215 -217
- data/third_party/boringssl-with-bazel/crypto/pem/pem_oth.cc +6 -6
- data/third_party/boringssl-with-bazel/crypto/pem/pem_pk8.cc +13 -13
- data/third_party/boringssl-with-bazel/crypto/pem/pem_pkey.cc +11 -11
- data/third_party/boringssl-with-bazel/crypto/pkcs7/internal.h +12 -17
- data/third_party/boringssl-with-bazel/crypto/pkcs7/pkcs7.cc +29 -27
- data/third_party/boringssl-with-bazel/crypto/pkcs7/pkcs7_x509.cc +55 -49
- data/third_party/boringssl-with-bazel/crypto/pkcs8/internal.h +21 -26
- data/third_party/boringssl-with-bazel/crypto/pkcs8/p5_pbev2.cc +33 -31
- data/third_party/boringssl-with-bazel/crypto/pkcs8/pkcs8.cc +73 -81
- data/third_party/boringssl-with-bazel/crypto/pkcs8/pkcs8_x509.cc +139 -138
- data/third_party/boringssl-with-bazel/crypto/poly1305/internal.h +3 -7
- data/third_party/boringssl-with-bazel/crypto/poly1305/poly1305.cc +5 -4
- data/third_party/boringssl-with-bazel/crypto/poly1305/poly1305_arm.cc +43 -47
- data/third_party/boringssl-with-bazel/crypto/poly1305/poly1305_vec.cc +29 -26
- data/third_party/boringssl-with-bazel/crypto/pool/internal.h +64 -20
- data/third_party/boringssl-with-bazel/crypto/pool/pool.cc +177 -157
- data/third_party/boringssl-with-bazel/crypto/rand/deterministic.cc +9 -16
- data/third_party/boringssl-with-bazel/crypto/rand/fork_detect.cc +70 -42
- data/third_party/boringssl-with-bazel/crypto/rand/forkunsafe.cc +7 -7
- data/third_party/boringssl-with-bazel/crypto/rand/getentropy.cc +6 -13
- data/third_party/boringssl-with-bazel/crypto/rand/internal.h +16 -4
- data/third_party/boringssl-with-bazel/crypto/rand/ios.cc +4 -11
- data/third_party/boringssl-with-bazel/crypto/rand/rand.cc +11 -9
- data/third_party/boringssl-with-bazel/crypto/rand/trusty.cc +4 -11
- data/third_party/boringssl-with-bazel/crypto/rand/urandom.cc +16 -195
- data/third_party/boringssl-with-bazel/crypto/rand/windows.cc +12 -19
- data/third_party/boringssl-with-bazel/crypto/refcount.cc +7 -17
- data/third_party/boringssl-with-bazel/crypto/rsa/internal.h +22 -7
- data/third_party/boringssl-with-bazel/crypto/rsa/rsa_asn1.cc +199 -78
- data/third_party/boringssl-with-bazel/crypto/rsa/rsa_crypt.cc +49 -50
- data/third_party/boringssl-with-bazel/crypto/rsa/rsa_extra.cc +11 -0
- data/third_party/boringssl-with-bazel/crypto/rsa/rsa_print.cc +4 -6
- data/third_party/boringssl-with-bazel/crypto/sha/sha1.cc +3 -0
- data/third_party/boringssl-with-bazel/crypto/sha/sha256.cc +3 -1
- data/third_party/boringssl-with-bazel/crypto/sha/sha512.cc +6 -4
- data/third_party/boringssl-with-bazel/crypto/siphash/siphash.cc +2 -0
- data/third_party/boringssl-with-bazel/crypto/slhdsa/slhdsa.cc +43 -6
- data/third_party/boringssl-with-bazel/crypto/spake2plus/internal.h +31 -31
- data/third_party/boringssl-with-bazel/crypto/spake2plus/spake2plus.cc +1 -1
- data/third_party/boringssl-with-bazel/crypto/stack/stack.cc +89 -130
- data/third_party/boringssl-with-bazel/crypto/thread.cc +14 -14
- data/third_party/boringssl-with-bazel/crypto/thread_none.cc +10 -13
- data/third_party/boringssl-with-bazel/crypto/thread_pthread.cc +22 -35
- data/third_party/boringssl-with-bazel/crypto/thread_win.cc +29 -40
- data/third_party/boringssl-with-bazel/crypto/trust_token/internal.h +81 -88
- data/third_party/boringssl-with-bazel/crypto/trust_token/pmbtoken.cc +160 -144
- data/third_party/boringssl-with-bazel/crypto/trust_token/trust_token.cc +96 -80
- data/third_party/boringssl-with-bazel/crypto/trust_token/voprf.cc +90 -87
- data/third_party/boringssl-with-bazel/crypto/x509/a_digest.cc +5 -5
- data/third_party/boringssl-with-bazel/crypto/x509/a_sign.cc +51 -48
- data/third_party/boringssl-with-bazel/crypto/x509/a_verify.cc +30 -34
- data/third_party/boringssl-with-bazel/crypto/x509/algorithm.cc +47 -16
- data/third_party/boringssl-with-bazel/crypto/x509/asn1_gen.cc +41 -43
- data/third_party/boringssl-with-bazel/crypto/x509/by_dir.cc +183 -237
- data/third_party/boringssl-with-bazel/crypto/x509/by_file.cc +29 -30
- data/third_party/boringssl-with-bazel/crypto/x509/internal.h +276 -180
- data/third_party/boringssl-with-bazel/crypto/x509/name_print.cc +15 -13
- data/third_party/boringssl-with-bazel/crypto/x509/policy.cc +415 -525
- data/third_party/boringssl-with-bazel/crypto/x509/rsa_pss.cc +94 -271
- data/third_party/boringssl-with-bazel/crypto/x509/t_crl.cc +11 -8
- data/third_party/boringssl-with-bazel/crypto/x509/t_req.cc +26 -23
- data/third_party/boringssl-with-bazel/crypto/x509/t_x509.cc +26 -22
- data/third_party/boringssl-with-bazel/crypto/x509/t_x509a.cc +3 -1
- data/third_party/boringssl-with-bazel/crypto/x509/v3_akey.cc +69 -76
- data/third_party/boringssl-with-bazel/crypto/x509/v3_akeya.cc +2 -2
- data/third_party/boringssl-with-bazel/crypto/x509/v3_alt.cc +112 -69
- data/third_party/boringssl-with-bazel/crypto/x509/v3_bcons.cc +15 -14
- data/third_party/boringssl-with-bazel/crypto/x509/v3_bitst.cc +16 -18
- data/third_party/boringssl-with-bazel/crypto/x509/v3_conf.cc +62 -67
- data/third_party/boringssl-with-bazel/crypto/x509/v3_cpols.cc +143 -170
- data/third_party/boringssl-with-bazel/crypto/x509/v3_crld.cc +121 -165
- data/third_party/boringssl-with-bazel/crypto/x509/v3_enum.cc +13 -12
- data/third_party/boringssl-with-bazel/crypto/x509/v3_extku.cc +17 -34
- data/third_party/boringssl-with-bazel/crypto/x509/v3_genn.cc +20 -10
- data/third_party/boringssl-with-bazel/crypto/x509/v3_ia5.cc +22 -18
- data/third_party/boringssl-with-bazel/crypto/x509/v3_info.cc +45 -47
- data/third_party/boringssl-with-bazel/crypto/x509/v3_int.cc +35 -33
- data/third_party/boringssl-with-bazel/crypto/x509/v3_lib.cc +106 -61
- data/third_party/boringssl-with-bazel/crypto/x509/v3_ncons.cc +642 -358
- data/third_party/boringssl-with-bazel/crypto/x509/v3_ocsp.cc +25 -22
- data/third_party/boringssl-with-bazel/crypto/x509/v3_pcons.cc +15 -14
- data/third_party/boringssl-with-bazel/crypto/x509/v3_pmaps.cc +16 -15
- data/third_party/boringssl-with-bazel/crypto/x509/v3_prn.cc +6 -6
- data/third_party/boringssl-with-bazel/crypto/x509/v3_purp.cc +150 -137
- data/third_party/boringssl-with-bazel/crypto/x509/v3_skey.cc +23 -26
- data/third_party/boringssl-with-bazel/crypto/x509/v3_utl.cc +151 -178
- data/third_party/boringssl-with-bazel/crypto/x509/x509.cc +1 -1
- data/third_party/boringssl-with-bazel/crypto/x509/x509_att.cc +32 -30
- data/third_party/boringssl-with-bazel/crypto/x509/x509_cmp.cc +95 -88
- data/third_party/boringssl-with-bazel/crypto/x509/x509_d2.cc +9 -9
- data/third_party/boringssl-with-bazel/crypto/x509/x509_def.cc +6 -8
- data/third_party/boringssl-with-bazel/crypto/x509/x509_ext.cc +46 -24
- data/third_party/boringssl-with-bazel/crypto/x509/x509_lu.cc +211 -195
- data/third_party/boringssl-with-bazel/crypto/x509/x509_obj.cc +20 -16
- data/third_party/boringssl-with-bazel/crypto/x509/x509_req.cc +37 -46
- data/third_party/boringssl-with-bazel/crypto/x509/x509_set.cc +62 -90
- data/third_party/boringssl-with-bazel/crypto/x509/x509_trs.cc +18 -13
- data/third_party/boringssl-with-bazel/crypto/x509/x509_v3.cc +33 -33
- data/third_party/boringssl-with-bazel/crypto/x509/x509_vfy.cc +109 -110
- data/third_party/boringssl-with-bazel/crypto/x509/x509_vpm.cc +56 -47
- data/third_party/boringssl-with-bazel/crypto/x509/x509cset.cc +27 -40
- data/third_party/boringssl-with-bazel/crypto/x509/x509name.cc +77 -67
- data/third_party/boringssl-with-bazel/crypto/x509/x509rset.cc +5 -17
- data/third_party/boringssl-with-bazel/crypto/x509/x509spki.cc +13 -13
- data/third_party/boringssl-with-bazel/crypto/x509/x_algor.cc +131 -24
- data/third_party/boringssl-with-bazel/crypto/x509/x_all.cc +72 -39
- data/third_party/boringssl-with-bazel/crypto/x509/x_attrib.cc +10 -4
- data/third_party/boringssl-with-bazel/crypto/x509/x_crl.cc +77 -44
- data/third_party/boringssl-with-bazel/crypto/x509/x_exten.cc +6 -0
- data/third_party/boringssl-with-bazel/crypto/x509/x_name.cc +311 -383
- data/third_party/boringssl-with-bazel/crypto/x509/x_pubkey.cc +129 -82
- data/third_party/boringssl-with-bazel/crypto/x509/x_req.cc +11 -6
- data/third_party/boringssl-with-bazel/crypto/x509/x_sig.cc +4 -4
- data/third_party/boringssl-with-bazel/crypto/x509/x_spki.cc +11 -1
- data/third_party/boringssl-with-bazel/crypto/x509/x_x509.cc +285 -280
- data/third_party/boringssl-with-bazel/crypto/x509/x_x509a.cc +60 -60
- data/third_party/boringssl-with-bazel/crypto/xwing/xwing.cc +257 -0
- data/third_party/boringssl-with-bazel/gen/boringssl_prefix_symbols_internal_x86_64_win_asm.inc +301 -0
- data/third_party/boringssl-with-bazel/gen/boringssl_prefix_symbols_internal_x86_win_asm.inc +301 -0
- data/third_party/boringssl-with-bazel/gen/crypto/err_data.cc +526 -500
- data/third_party/boringssl-with-bazel/include/openssl/aead.h +286 -114
- data/third_party/boringssl-with-bazel/include/openssl/aes.h +43 -43
- data/third_party/boringssl-with-bazel/include/openssl/asm_base.h +29 -16
- data/third_party/boringssl-with-bazel/include/openssl/asn1.h +641 -631
- data/third_party/boringssl-with-bazel/include/openssl/asn1t.h +7 -9
- data/third_party/boringssl-with-bazel/include/openssl/base.h +34 -54
- data/third_party/boringssl-with-bazel/include/openssl/base64.h +30 -30
- data/third_party/boringssl-with-bazel/include/openssl/bio.h +373 -316
- data/third_party/boringssl-with-bazel/include/openssl/blake2.h +15 -11
- data/third_party/boringssl-with-bazel/include/openssl/blowfish.h +10 -3
- data/third_party/boringssl-with-bazel/include/openssl/bn.h +298 -306
- data/third_party/boringssl-with-bazel/include/openssl/buf.h +14 -14
- data/third_party/boringssl-with-bazel/include/openssl/bytestring.h +272 -207
- data/third_party/boringssl-with-bazel/include/openssl/cast.h +45 -8
- data/third_party/boringssl-with-bazel/include/openssl/chacha.h +3 -3
- data/third_party/boringssl-with-bazel/include/openssl/cipher.h +334 -152
- data/third_party/boringssl-with-bazel/include/openssl/cmac.h +13 -13
- data/third_party/boringssl-with-bazel/include/openssl/cms.h +35 -34
- data/third_party/boringssl-with-bazel/include/openssl/conf.h +15 -14
- data/third_party/boringssl-with-bazel/include/openssl/crypto.h +15 -13
- data/third_party/boringssl-with-bazel/include/openssl/ctrdrbg.h +49 -15
- data/third_party/boringssl-with-bazel/include/openssl/curve25519.h +24 -24
- data/third_party/boringssl-with-bazel/include/openssl/des.h +22 -16
- data/third_party/boringssl-with-bazel/include/openssl/dh.h +95 -95
- data/third_party/boringssl-with-bazel/include/openssl/digest.h +140 -71
- data/third_party/boringssl-with-bazel/include/openssl/dsa.h +101 -101
- data/third_party/boringssl-with-bazel/include/openssl/ec.h +143 -119
- data/third_party/boringssl-with-bazel/include/openssl/ec_key.h +97 -97
- data/third_party/boringssl-with-bazel/include/openssl/ecdh.h +9 -9
- data/third_party/boringssl-with-bazel/include/openssl/ecdsa.h +89 -46
- data/third_party/boringssl-with-bazel/include/openssl/engine.h +5 -5
- data/third_party/boringssl-with-bazel/include/openssl/err.h +73 -71
- data/third_party/boringssl-with-bazel/include/openssl/evp.h +824 -344
- data/third_party/boringssl-with-bazel/include/openssl/evp_errors.h +9 -2
- data/third_party/boringssl-with-bazel/include/openssl/ex_data.h +27 -32
- data/third_party/boringssl-with-bazel/include/openssl/hkdf.h +6 -6
- data/third_party/boringssl-with-bazel/include/openssl/hmac.h +31 -31
- data/third_party/boringssl-with-bazel/include/openssl/hpke.h +133 -117
- data/third_party/boringssl-with-bazel/include/openssl/hrss.h +14 -8
- data/third_party/boringssl-with-bazel/include/openssl/kdf.h +20 -19
- data/third_party/boringssl-with-bazel/include/openssl/lhash.h +4 -25
- data/third_party/boringssl-with-bazel/include/openssl/md4.h +14 -7
- data/third_party/boringssl-with-bazel/include/openssl/md5.h +7 -7
- data/third_party/boringssl-with-bazel/include/openssl/mem.h +38 -38
- data/third_party/boringssl-with-bazel/include/openssl/mldsa.h +380 -24
- data/third_party/boringssl-with-bazel/include/openssl/mlkem.h +43 -43
- data/third_party/boringssl-with-bazel/include/openssl/nid.h +1297 -2
- data/third_party/boringssl-with-bazel/include/openssl/obj.h +49 -49
- data/third_party/boringssl-with-bazel/include/openssl/opensslconf.h +30 -0
- data/third_party/boringssl-with-bazel/include/openssl/params.h +42 -0
- data/third_party/boringssl-with-bazel/include/openssl/pem.h +39 -30
- data/third_party/boringssl-with-bazel/include/openssl/pkcs7.h +40 -40
- data/third_party/boringssl-with-bazel/include/openssl/pkcs8.h +69 -63
- data/third_party/boringssl-with-bazel/include/openssl/poly1305.h +8 -5
- data/third_party/boringssl-with-bazel/include/openssl/pool.h +54 -25
- data/third_party/boringssl-with-bazel/include/openssl/posix_time.h +6 -6
- data/third_party/boringssl-with-bazel/include/openssl/prefix_symbols.h +7866 -0
- data/third_party/boringssl-with-bazel/include/openssl/prefix_symbols_internal_S.h +585 -0
- data/third_party/boringssl-with-bazel/include/openssl/prefix_symbols_internal_c.h +305 -0
- data/third_party/boringssl-with-bazel/include/openssl/rand.h +18 -18
- data/third_party/boringssl-with-bazel/include/openssl/rc4.h +4 -4
- data/third_party/boringssl-with-bazel/include/openssl/ripemd.h +15 -10
- data/third_party/boringssl-with-bazel/include/openssl/rsa.h +272 -235
- data/third_party/boringssl-with-bazel/include/openssl/service_indicator.h +4 -81
- data/third_party/boringssl-with-bazel/include/openssl/sha.h +43 -166
- data/third_party/boringssl-with-bazel/include/openssl/sha2.h +201 -0
- data/third_party/boringssl-with-bazel/include/openssl/slhdsa.h +100 -48
- data/third_party/boringssl-with-bazel/include/openssl/span.h +190 -75
- data/third_party/boringssl-with-bazel/include/openssl/ssl.h +2168 -1567
- data/third_party/boringssl-with-bazel/include/openssl/ssl3.h +11 -69
- data/third_party/boringssl-with-bazel/include/openssl/stack.h +135 -80
- data/third_party/boringssl-with-bazel/include/openssl/target.h +13 -1
- data/third_party/boringssl-with-bazel/include/openssl/thread.h +0 -10
- data/third_party/boringssl-with-bazel/include/openssl/tls1.h +31 -310
- data/third_party/boringssl-with-bazel/include/openssl/tls_prf.h +47 -0
- data/third_party/boringssl-with-bazel/include/openssl/trust_token.h +97 -92
- data/third_party/boringssl-with-bazel/include/openssl/type_check.h +1 -1
- data/third_party/boringssl-with-bazel/include/openssl/x509.h +1805 -1857
- data/third_party/boringssl-with-bazel/include/openssl/x509v3.h +1 -1
- data/third_party/boringssl-with-bazel/include/openssl/xwing.h +115 -0
- data/third_party/boringssl-with-bazel/ssl/bio_ssl.cc +24 -19
- data/third_party/boringssl-with-bazel/ssl/d1_both.cc +59 -57
- data/third_party/boringssl-with-bazel/ssl/d1_lib.cc +53 -42
- data/third_party/boringssl-with-bazel/ssl/d1_pkt.cc +4 -4
- data/third_party/boringssl-with-bazel/ssl/d1_srtp.cc +2 -2
- data/third_party/boringssl-with-bazel/ssl/dtls_method.cc +10 -10
- data/third_party/boringssl-with-bazel/ssl/dtls_record.cc +6 -6
- data/third_party/boringssl-with-bazel/ssl/encrypted_client_hello.cc +61 -71
- data/third_party/boringssl-with-bazel/ssl/extensions.cc +967 -366
- data/third_party/boringssl-with-bazel/ssl/handoff.cc +77 -38
- data/third_party/boringssl-with-bazel/ssl/handshake.cc +63 -30
- data/third_party/boringssl-with-bazel/ssl/handshake_client.cc +129 -85
- data/third_party/boringssl-with-bazel/ssl/handshake_server.cc +116 -68
- data/third_party/boringssl-with-bazel/ssl/internal.h +983 -1207
- data/third_party/boringssl-with-bazel/ssl/s3_both.cc +34 -29
- data/third_party/boringssl-with-bazel/ssl/s3_lib.cc +4 -3
- data/third_party/boringssl-with-bazel/ssl/s3_pkt.cc +12 -12
- data/third_party/boringssl-with-bazel/ssl/ssl_aead_ctx.cc +5 -5
- data/third_party/boringssl-with-bazel/ssl/ssl_asn1.cc +114 -59
- data/third_party/boringssl-with-bazel/ssl/ssl_buffer.cc +17 -18
- data/third_party/boringssl-with-bazel/ssl/ssl_cert.cc +99 -61
- data/third_party/boringssl-with-bazel/ssl/ssl_cipher.cc +143 -134
- data/third_party/boringssl-with-bazel/ssl/ssl_credential.cc +188 -90
- data/third_party/boringssl-with-bazel/ssl/ssl_file.cc +132 -225
- data/third_party/boringssl-with-bazel/ssl/ssl_key_share.cc +79 -7
- data/third_party/boringssl-with-bazel/ssl/ssl_lib.cc +698 -302
- data/third_party/boringssl-with-bazel/ssl/ssl_privkey.cc +102 -45
- data/third_party/boringssl-with-bazel/ssl/ssl_session.cc +117 -102
- data/third_party/boringssl-with-bazel/ssl/ssl_transcript.cc +3 -3
- data/third_party/boringssl-with-bazel/ssl/ssl_versions.cc +24 -24
- data/third_party/boringssl-with-bazel/ssl/ssl_x509.cc +184 -170
- data/third_party/boringssl-with-bazel/ssl/t1_enc.cc +12 -10
- data/third_party/boringssl-with-bazel/ssl/tls13_both.cc +86 -54
- data/third_party/boringssl-with-bazel/ssl/tls13_client.cc +176 -90
- data/third_party/boringssl-with-bazel/ssl/tls13_enc.cc +166 -112
- data/third_party/boringssl-with-bazel/ssl/tls13_server.cc +188 -97
- data/third_party/boringssl-with-bazel/ssl/tls_method.cc +23 -23
- data/third_party/boringssl-with-bazel/ssl/tls_record.cc +17 -14
- data/third_party/boringssl-with-bazel/third_party/fiat/bedrock_unverified_bareminimum.c.inc +47 -0
- data/third_party/boringssl-with-bazel/third_party/fiat/bedrock_unverified_platform.c.inc +137 -0
- data/third_party/boringssl-with-bazel/third_party/fiat/curve25519_64_adx.h +37 -33
- data/third_party/boringssl-with-bazel/third_party/fiat/p256_64.h +4 -93
- data/third_party/boringssl-with-bazel/third_party/fiat/p256_64_msvc.h +4 -69
- data/third_party/boringssl-with-bazel/third_party/fiat/p256_field_32.br.c.inc +71 -0
- data/third_party/boringssl-with-bazel/third_party/fiat/p256_field_64.br.c.inc +84 -0
- data/third_party/boringssl-with-bazel/third_party/fiat/p256_point.br.c.inc +166 -0
- data/third_party/upb/upb/base/error_handler.h +79 -0
- data/third_party/upb/upb/base/internal/log2.h +29 -5
- data/third_party/upb/upb/generated_code_support.h +1 -0
- data/third_party/upb/upb/hash/common.c +129 -14
- data/third_party/upb/upb/hash/common.h +1 -1
- data/third_party/upb/upb/hash/ext_table.h +65 -0
- data/third_party/upb/upb/lex/strtod.c +14 -5
- data/third_party/upb/upb/mem/arena.c +113 -95
- data/third_party/upb/upb/mem/internal/arena.h +13 -8
- data/third_party/upb/upb/message/accessors.c +2 -3
- data/third_party/upb/upb/message/accessors.h +32 -12
- data/third_party/upb/upb/message/array.c +51 -2
- data/third_party/upb/upb/message/array.h +10 -0
- data/third_party/upb/upb/message/copy.c +18 -34
- data/third_party/upb/upb/message/internal/accessors.h +15 -49
- data/third_party/upb/upb/message/internal/array.h +1 -1
- data/third_party/upb/upb/message/internal/map.h +1 -1
- data/third_party/upb/upb/message/internal/message.c +8 -1
- data/third_party/upb/upb/message/internal/message.h +40 -10
- data/third_party/upb/upb/message/message.c +3 -2
- data/third_party/upb/upb/message/value.h +0 -6
- data/third_party/upb/upb/mini_descriptor/decode.c +78 -59
- data/third_party/upb/upb/mini_descriptor/link.c +8 -6
- data/third_party/upb/upb/mini_table/extension_registry.c +17 -49
- data/third_party/upb/upb/mini_table/extension_registry.h +5 -17
- data/third_party/upb/upb/mini_table/generated_registry.c +180 -0
- data/third_party/upb/upb/mini_table/generated_registry.h +66 -0
- data/third_party/upb/upb/mini_table/internal/extension.h +5 -3
- data/third_party/upb/upb/mini_table/internal/field.h +7 -5
- data/third_party/upb/upb/mini_table/internal/generated_registry.h +37 -0
- data/third_party/upb/upb/mini_table/internal/message.c +0 -18
- data/third_party/upb/upb/mini_table/internal/message.h +24 -41
- data/third_party/upb/upb/mini_table/internal/size_log2.h +2 -1
- data/third_party/upb/upb/mini_table/internal/sub.h +2 -5
- data/third_party/upb/upb/mini_table/message.h +34 -13
- data/third_party/upb/upb/port/atomic.h +180 -74
- data/third_party/upb/upb/port/def.inc +194 -29
- data/third_party/upb/upb/port/sanitizers.h +15 -0
- data/third_party/upb/upb/port/undef.inc +6 -2
- data/third_party/upb/upb/reflection/common.h +0 -6
- data/third_party/upb/upb/reflection/def.hpp +8 -12
- data/third_party/upb/upb/reflection/def_pool.c +85 -33
- data/third_party/upb/upb/reflection/def_pool.h +38 -8
- data/third_party/upb/upb/reflection/def_type.h +3 -0
- data/third_party/upb/upb/reflection/enum_def.c +45 -33
- data/third_party/upb/upb/reflection/enum_def.h +8 -4
- data/third_party/upb/upb/reflection/enum_reserved_range.c +7 -3
- data/third_party/upb/upb/reflection/enum_value_def.c +14 -29
- data/third_party/upb/upb/reflection/enum_value_def.h +5 -4
- data/third_party/upb/upb/reflection/extension_range.c +15 -14
- data/third_party/upb/upb/reflection/extension_range.h +7 -4
- data/third_party/upb/upb/reflection/field_def.c +114 -96
- data/third_party/upb/upb/reflection/field_def.h +3 -3
- data/third_party/upb/upb/reflection/file_def.c +71 -65
- data/third_party/upb/upb/reflection/file_def.h +4 -5
- data/third_party/upb/upb/reflection/internal/def_builder.c +22 -14
- data/third_party/upb/upb/reflection/internal/def_builder.h +44 -38
- data/third_party/upb/upb/reflection/internal/def_pool.h +5 -1
- data/third_party/upb/upb/reflection/internal/enum_def.h +6 -4
- data/third_party/upb/upb/reflection/internal/enum_reserved_range.h +3 -2
- data/third_party/upb/upb/reflection/internal/enum_value_def.h +7 -4
- data/third_party/upb/upb/reflection/internal/extension_range.h +4 -3
- data/third_party/upb/upb/reflection/internal/field_def.h +15 -12
- data/third_party/upb/upb/reflection/internal/file_def.h +8 -1
- data/third_party/upb/upb/reflection/internal/message_def.h +10 -7
- data/third_party/upb/upb/reflection/internal/message_reserved_range.h +3 -1
- data/third_party/upb/upb/reflection/internal/method_def.h +6 -6
- data/third_party/upb/upb/reflection/internal/oneof_def.h +6 -6
- data/third_party/upb/upb/reflection/internal/service_def.h +9 -6
- data/third_party/upb/upb/reflection/internal/upb_edition_defaults.h +1 -1
- data/third_party/upb/upb/reflection/message_def.c +46 -53
- data/third_party/upb/upb/reflection/message_def.h +6 -7
- data/third_party/upb/upb/reflection/message_reserved_range.c +7 -6
- data/third_party/upb/upb/reflection/method_def.c +22 -20
- data/third_party/upb/upb/reflection/method_def.h +4 -4
- data/third_party/upb/upb/reflection/oneof_def.c +17 -15
- data/third_party/upb/upb/reflection/oneof_def.h +6 -3
- data/third_party/upb/upb/reflection/service_def.c +50 -23
- data/third_party/upb/upb/reflection/service_def.h +7 -4
- data/third_party/upb/upb/text/internal/encode.c +7 -10
- data/third_party/upb/upb/wire/decode.c +269 -430
- data/third_party/upb/upb/wire/decode.h +6 -45
- data/third_party/upb/upb/wire/decode_fast/combinations.h +7 -3
- data/third_party/upb/upb/wire/decode_fast/select.c +7 -2
- data/third_party/upb/upb/wire/encode.c +144 -106
- data/third_party/upb/upb/wire/encode.h +6 -2
- data/third_party/upb/upb/wire/eps_copy_input_stream.c +36 -7
- data/third_party/upb/upb/wire/eps_copy_input_stream.h +94 -380
- data/third_party/upb/upb/wire/internal/decoder.c +1 -14
- data/third_party/upb/upb/wire/internal/decoder.h +84 -24
- data/third_party/upb/upb/wire/internal/eps_copy_input_stream.h +339 -0
- data/third_party/upb/upb/wire/internal/reader.h +29 -12
- data/third_party/upb/upb/wire/reader.c +35 -22
- data/third_party/upb/upb/wire/reader.h +11 -18
- data/third_party/utf8_range/utf8_range.c +1 -1
- data/third_party/utf8_range/utf8_range.h +2 -1
- metadata +158 -96
- data/src/core/ext/filters/fault_injection/fault_injection_service_config_parser.cc +0 -117
- data/src/core/ext/filters/fault_injection/fault_injection_service_config_parser.h +0 -109
- data/src/core/ext/filters/gcp_authentication/gcp_authentication_service_config_parser.cc +0 -80
- data/src/core/ext/filters/gcp_authentication/gcp_authentication_service_config_parser.h +0 -86
- data/src/core/ext/filters/stateful_session/stateful_session_service_config_parser.cc +0 -83
- data/src/core/ext/filters/stateful_session/stateful_session_service_config_parser.h +0 -91
- data/src/core/ext/transport/chttp2/transport/bin_decoder.cc +0 -240
- data/src/core/ext/transport/chttp2/transport/bin_decoder.h +0 -56
- data/src/core/ext/transport/chttp2/transport/incoming_metadata_tracker.h +0 -217
- data/src/core/ext/upb-gen/src/proto/grpc/channelz/channelz.upb_minitable.c +0 -835
- data/src/core/ext/upb-gen/src/proto/grpc/channelz/channelz.upb_minitable.h +0 -108
- data/src/core/ext/upb-gen/src/proto/grpc/gcp/altscontext.upb_minitable.c +0 -73
- data/src/core/ext/upb-gen/src/proto/grpc/gcp/handshaker.upb_minitable.c +0 -298
- data/src/core/ext/upb-gen/src/proto/grpc/gcp/transport_security_common.upb_minitable.c +0 -97
- data/src/core/ext/upb-gen/src/proto/grpc/gcp/transport_security_common.upb_minitable.h +0 -38
- data/src/core/ext/upb-gen/src/proto/grpc/health/v1/health.upb.h +0 -150
- data/src/core/ext/upb-gen/src/proto/grpc/health/v1/health.upb_minitable.c +0 -60
- data/src/core/ext/upb-gen/src/proto/grpc/lb/v1/load_balancer.upb_minitable.c +0 -199
- data/src/core/ext/upb-gen/src/proto/grpc/lb/v1/load_balancer.upb_minitable.h +0 -48
- data/src/core/ext/upb-gen/src/proto/grpc/lookup/v1/rls.upb.h +0 -300
- data/src/core/ext/upb-gen/src/proto/grpc/lookup/v1/rls.upb_minitable.c +0 -84
- data/src/core/ext/upb-gen/src/proto/grpc/lookup/v1/rls_config.upb_minitable.c +0 -213
- data/src/core/ext/upb-gen/src/proto/grpc/lookup/v1/rls_config.upb_minitable.h +0 -48
- data/src/core/ext/upbdefs-gen/src/proto/grpc/channelz/channelz.upbdefs.c +0 -716
- data/src/core/ext/upbdefs-gen/src/proto/grpc/lookup/v1/rls_config.upbdefs.c +0 -181
- data/src/core/lib/iomgr/resolve_address.cc +0 -59
- data/src/core/lib/iomgr/resolve_address.h +0 -125
- data/src/core/lib/iomgr/resolve_address_impl.h +0 -58
- data/src/core/lib/iomgr/resolve_address_posix.cc +0 -184
- data/src/core/lib/iomgr/resolve_address_posix.h +0 -78
- data/src/core/lib/iomgr/resolve_address_windows.cc +0 -169
- data/src/core/lib/iomgr/resolve_address_windows.h +0 -76
- data/src/core/resolver/dns/c_ares/dns_resolver_ares.cc +0 -781
- data/src/core/resolver/dns/c_ares/grpc_ares_ev_driver.h +0 -93
- data/src/core/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc +0 -203
- data/src/core/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc +0 -838
- data/src/core/resolver/dns/c_ares/grpc_ares_wrapper.cc +0 -1237
- data/src/core/resolver/dns/c_ares/grpc_ares_wrapper.h +0 -130
- data/src/core/resolver/dns/c_ares/grpc_ares_wrapper_windows.cc +0 -35
- data/src/core/resolver/dns/dns_resolver_plugin.cc +0 -69
- data/src/core/resolver/dns/native/dns_resolver.cc +0 -173
- data/src/core/util/json/json_util.cc +0 -101
- data/src/core/util/json/json_util.h +0 -163
- data/third_party/abseil-cpp/absl/base/internal/identity.h +0 -39
- data/third_party/abseil-cpp/absl/base/internal/nullability_deprecated.h +0 -106
- data/third_party/abseil-cpp/absl/hash/internal/low_level_hash.cc +0 -105
- data/third_party/abseil-cpp/absl/hash/internal/low_level_hash.h +0 -50
- data/third_party/abseil-cpp/absl/strings/string_view.cc +0 -257
- data/third_party/boringssl-with-bazel/crypto/evp/p_dh_asn1.cc +0 -142
- data/third_party/boringssl-with-bazel/crypto/evp/p_dsa_asn1.cc +0 -279
- data/third_party/boringssl-with-bazel/crypto/evp/p_ec_asn1.cc +0 -286
- data/third_party/boringssl-with-bazel/crypto/evp/p_ed25519_asn1.cc +0 -225
- data/third_party/boringssl-with-bazel/crypto/evp/p_rsa_asn1.cc +0 -198
- data/third_party/boringssl-with-bazel/crypto/evp/p_x25519_asn1.cc +0 -237
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/ec/p224-64.cc.inc +0 -1163
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/ec/p256-nistz.cc.inc +0 -741
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/ec/p256-nistz.h +0 -207
- data/third_party/boringssl-with-bazel/crypto/fipsmodule/rsa/blinding.cc.inc +0 -147
- data/third_party/boringssl-with-bazel/crypto/rand/getrandom_fillin.h +0 -64
- data/third_party/boringssl-with-bazel/crypto/rand/passive.cc +0 -178
- data/third_party/boringssl-with-bazel/crypto/x509/ext_dat.h +0 -92
- data/third_party/boringssl-with-bazel/include/openssl/bcm_public.h +0 -82
- data/third_party/boringssl-with-bazel/include/openssl/experimental/kyber.h +0 -146
- data/third_party/upb/upb/message/internal/tagged_ptr.h +0 -56
- data/third_party/upb/upb/message/tagged_ptr.h +0 -48
|
@@ -18,14 +18,18 @@
|
|
|
18
18
|
|
|
19
19
|
#include "src/core/tsi/ssl_transport_security.h"
|
|
20
20
|
|
|
21
|
+
#include <grpc/event_engine/event_engine.h>
|
|
21
22
|
#include <grpc/private_key_signer.h>
|
|
22
23
|
#include <grpc/support/port_platform.h>
|
|
23
24
|
#include <limits.h>
|
|
24
25
|
#include <string.h>
|
|
25
26
|
|
|
26
27
|
#include <cstddef>
|
|
28
|
+
#include <cstdint>
|
|
27
29
|
#include <cstdlib>
|
|
28
30
|
#include <utility>
|
|
31
|
+
#include <variant>
|
|
32
|
+
#include <vector>
|
|
29
33
|
|
|
30
34
|
// TODO(jboeuf): refactor inet_ntop into a portability header.
|
|
31
35
|
// Note: for whomever reads this and tries to refactor this, this
|
|
@@ -45,7 +49,9 @@
|
|
|
45
49
|
#include <grpc/support/thd_id.h>
|
|
46
50
|
#include <openssl/bio.h>
|
|
47
51
|
#include <openssl/crypto.h> // For OPENSSL_free
|
|
52
|
+
#if !defined(OPENSSL_NO_ENGINE)
|
|
48
53
|
#include <openssl/engine.h>
|
|
54
|
+
#endif
|
|
49
55
|
#include <openssl/err.h>
|
|
50
56
|
#include <openssl/ssl.h>
|
|
51
57
|
#include <openssl/tls1.h>
|
|
@@ -55,39 +61,41 @@
|
|
|
55
61
|
#include <memory>
|
|
56
62
|
#include <optional>
|
|
57
63
|
#include <string>
|
|
58
|
-
#include <vector>
|
|
59
64
|
|
|
65
|
+
#include "src/core/credentials/transport/tls/grpc_tls_certificate_selector.h"
|
|
60
66
|
#include "src/core/credentials/transport/tls/grpc_tls_crl_provider.h"
|
|
67
|
+
#include "src/core/credentials/transport/tls/spiffe_utils.h"
|
|
61
68
|
#include "src/core/credentials/transport/tls/ssl_utils.h"
|
|
62
|
-
#include "src/core/lib/
|
|
69
|
+
#include "src/core/lib/debug/trace_impl.h"
|
|
63
70
|
#include "src/core/lib/iomgr/exec_ctx.h"
|
|
64
71
|
#include "src/core/lib/surface/init.h"
|
|
65
72
|
#include "src/core/tsi/ssl/key_logging/ssl_key_logging.h"
|
|
73
|
+
#include "src/core/tsi/ssl/session_cache/ssl_session.h"
|
|
66
74
|
#include "src/core/tsi/ssl/session_cache/ssl_session_cache.h"
|
|
75
|
+
#include "src/core/tsi/ssl_telemetry_utils.h"
|
|
67
76
|
#include "src/core/tsi/ssl_transport_security_utils.h"
|
|
68
77
|
#include "src/core/tsi/ssl_types.h"
|
|
78
|
+
#include "src/core/tsi/tls_telemetry.h"
|
|
69
79
|
#include "src/core/tsi/transport_security.h"
|
|
70
80
|
#include "src/core/tsi/transport_security_interface.h"
|
|
71
|
-
#include "src/core/util/env.h"
|
|
72
81
|
#include "src/core/util/grpc_check.h"
|
|
73
82
|
#include "src/core/util/match.h"
|
|
83
|
+
#include "src/core/util/memory.h"
|
|
74
84
|
#include "src/core/util/ref_counted.h"
|
|
75
85
|
#include "src/core/util/ref_counted_ptr.h"
|
|
86
|
+
#include "src/core/util/status_helper.h"
|
|
76
87
|
#include "src/core/util/sync.h"
|
|
77
88
|
#include "src/core/util/useful.h"
|
|
78
89
|
#include "absl/base/thread_annotations.h"
|
|
79
90
|
#include "absl/functional/bind_front.h"
|
|
80
91
|
#include "absl/log/log.h"
|
|
92
|
+
#include "absl/status/status.h"
|
|
81
93
|
#include "absl/strings/match.h"
|
|
82
|
-
#include "absl/strings/numbers.h"
|
|
83
94
|
#include "absl/strings/str_cat.h"
|
|
95
|
+
#include "absl/strings/str_format.h"
|
|
84
96
|
#include "absl/strings/str_join.h"
|
|
85
97
|
#include "absl/strings/string_view.h"
|
|
86
|
-
|
|
87
|
-
// Name of the environment variable controlling OpenSSL cleanup timeout.
|
|
88
|
-
// This variable allows users to specify the timeout (in seconds) for OpenSSL
|
|
89
|
-
// resource cleanup during gRPC shutdown. If not set, a default timeout is used.
|
|
90
|
-
#define GRPC_ARG_OPENSSL_CLEANUP_TIMEOUT_ENV "grpc.openssl_cleanup_timeout"
|
|
98
|
+
#include "absl/time/time.h"
|
|
91
99
|
|
|
92
100
|
// --- Constants. ---
|
|
93
101
|
|
|
@@ -96,6 +104,12 @@
|
|
|
96
104
|
#define TSI_SSL_MAX_PROTECTED_FRAME_SIZE_LOWER_BOUND 1024
|
|
97
105
|
#define TSI_SSL_HANDSHAKER_OUTGOING_BUFFER_INITIAL_SIZE 1024
|
|
98
106
|
const size_t kMaxChainLength = 100;
|
|
107
|
+
const char kDefaultBoringSSLKeyExchangeGroups[] =
|
|
108
|
+
"X25519MLKEM768:X25519:P-256:P-384:P-521";
|
|
109
|
+
[[maybe_unused]] const char kDefaultOpenSSL1_1_1KeyExchangeGroups[] =
|
|
110
|
+
"X25519:P-256:P-384:P-521";
|
|
111
|
+
[[maybe_unused]] const char kDefaultOpenSSL1_0_2KeyExchangeGroups[] =
|
|
112
|
+
"P-256:P-384:P-521";
|
|
99
113
|
|
|
100
114
|
// Putting a macro like this and littering the source file with #if is really
|
|
101
115
|
// bad practice.
|
|
@@ -109,8 +123,15 @@ const size_t kMaxChainLength = 100;
|
|
|
109
123
|
#define TSI_SSL_MAX_PROTECTION_OVERHEAD 100
|
|
110
124
|
|
|
111
125
|
using TlsSessionKeyLogger = tsi::TlsSessionKeyLoggerCache::TlsSessionKeyLogger;
|
|
112
|
-
|
|
113
|
-
using
|
|
126
|
+
#if defined(OPENSSL_IS_BORINGSSL)
|
|
127
|
+
using SelectCertificateInfo =
|
|
128
|
+
grpc_core::CertificateSelector::SelectCertificateInfo;
|
|
129
|
+
using SelectCertificateResult =
|
|
130
|
+
grpc_core::CertificateSelector::SelectCertificateResult;
|
|
131
|
+
using AsyncCertificateSelectionHandle =
|
|
132
|
+
grpc_core::CertificateSelector::AsyncCertificateSelectionHandle;
|
|
133
|
+
#endif
|
|
134
|
+
using grpc_core::PrivateKey;
|
|
114
135
|
using tsi::RootCertInfo;
|
|
115
136
|
|
|
116
137
|
// --- Structure definitions. ---
|
|
@@ -169,6 +190,9 @@ struct tsi_ssl_server_handshaker_factory {
|
|
|
169
190
|
size_t alpn_protocol_list_length;
|
|
170
191
|
grpc_core::RefCountedPtr<TlsSessionKeyLogger> key_logger;
|
|
171
192
|
std::shared_ptr<tsi::RootCertInfo> root_cert_info;
|
|
193
|
+
#if defined(OPENSSL_IS_BORINGSSL)
|
|
194
|
+
std::shared_ptr<grpc_core::CertificateSelector> certificate_selector;
|
|
195
|
+
#endif // defined(OPENSSL_IS_BORINGSSL)
|
|
172
196
|
};
|
|
173
197
|
|
|
174
198
|
// Tracks the arguments for a pending call to tsi_handshaker_next().
|
|
@@ -186,9 +210,47 @@ struct HandshakerNextArgs {
|
|
|
186
210
|
tsi_handshaker_result* handshaker_result = nullptr;
|
|
187
211
|
};
|
|
188
212
|
|
|
213
|
+
struct tsi_ssl_handshaker_result {
|
|
214
|
+
tsi_handshaker_result base;
|
|
215
|
+
SSL* ssl;
|
|
216
|
+
BIO* network_io;
|
|
217
|
+
unsigned char* unused_bytes;
|
|
218
|
+
size_t unused_bytes_size;
|
|
219
|
+
};
|
|
220
|
+
|
|
221
|
+
struct SslHandshakeResult {
|
|
222
|
+
tsi_result tsi_handshake_result;
|
|
223
|
+
int ssl_error = SSL_ERROR_NONE;
|
|
224
|
+
unsigned long err_code = 0;
|
|
225
|
+
};
|
|
226
|
+
|
|
189
227
|
struct tsi_ssl_handshaker : public tsi_handshaker,
|
|
190
228
|
public grpc_core::RefCounted<tsi_ssl_handshaker> {
|
|
191
|
-
tsi_ssl_handshaker(
|
|
229
|
+
tsi_ssl_handshaker(
|
|
230
|
+
const tsi_handshaker_vtable* handshaker_vtable, SSL* ssl, BIO* network_io,
|
|
231
|
+
tsi_ssl_handshaker_factory* factory_ref,
|
|
232
|
+
grpc_core::RefCountedPtr<grpc_core::CollectionScope> collection_scope,
|
|
233
|
+
bool is_client, std::shared_ptr<grpc_core::PrivateKeySigner> signer,
|
|
234
|
+
std::string target, std::string locality, std::string backend_service)
|
|
235
|
+
: tsi_handshaker(handshaker_vtable),
|
|
236
|
+
ssl(ssl),
|
|
237
|
+
network_io(network_io),
|
|
238
|
+
result(TSI_HANDSHAKE_IN_PROGRESS),
|
|
239
|
+
outgoing_bytes_buffer_size(
|
|
240
|
+
TSI_SSL_HANDSHAKER_OUTGOING_BUFFER_INITIAL_SIZE),
|
|
241
|
+
outgoing_bytes_buffer(static_cast<unsigned char*>(
|
|
242
|
+
gpr_zalloc(outgoing_bytes_buffer_size))),
|
|
243
|
+
factory_ref(factory_ref),
|
|
244
|
+
collection_scope(std::move(collection_scope)),
|
|
245
|
+
is_client(is_client),
|
|
246
|
+
target(std::move(target)),
|
|
247
|
+
locality(std::move(locality)),
|
|
248
|
+
backend_service(std::move(backend_service)) {
|
|
249
|
+
#if defined(OPENSSL_IS_BORINGSSL)
|
|
250
|
+
key_signer = std::move(signer);
|
|
251
|
+
#endif
|
|
252
|
+
}
|
|
253
|
+
|
|
192
254
|
~tsi_ssl_handshaker() override {
|
|
193
255
|
SSL_free(ssl);
|
|
194
256
|
BIO_free(network_io);
|
|
@@ -199,9 +261,10 @@ struct tsi_ssl_handshaker : public tsi_handshaker,
|
|
|
199
261
|
SSL* ssl;
|
|
200
262
|
BIO* network_io;
|
|
201
263
|
tsi_result result;
|
|
202
|
-
unsigned char* outgoing_bytes_buffer;
|
|
203
264
|
size_t outgoing_bytes_buffer_size;
|
|
265
|
+
unsigned char* outgoing_bytes_buffer;
|
|
204
266
|
tsi_ssl_handshaker_factory* factory_ref;
|
|
267
|
+
grpc_core::RefCountedPtr<grpc_core::CollectionScope> collection_scope;
|
|
205
268
|
grpc_core::Mutex mu;
|
|
206
269
|
bool is_shutdown ABSL_GUARDED_BY(mu) = false;
|
|
207
270
|
|
|
@@ -214,8 +277,24 @@ struct tsi_ssl_handshaker : public tsi_handshaker,
|
|
|
214
277
|
if (handshaker_next_args->error_ptr == nullptr) return;
|
|
215
278
|
*handshaker_next_args->error_ptr = std::move(error);
|
|
216
279
|
}
|
|
280
|
+
bool is_client = false;
|
|
281
|
+
std::string target;
|
|
282
|
+
std::string locality;
|
|
283
|
+
std::string backend_service;
|
|
284
|
+
bool metric_recorded ABSL_GUARDED_BY(mu) = false;
|
|
285
|
+
|
|
286
|
+
void MaybeRecordTelemetry(const SslHandshakeResult& handshake_result)
|
|
287
|
+
ABSL_EXCLUSIVE_LOCKS_REQUIRED(&mu);
|
|
288
|
+
|
|
217
289
|
#if defined(OPENSSL_IS_BORINGSSL)
|
|
218
|
-
std::shared_ptr<
|
|
290
|
+
std::shared_ptr<AsyncCertificateSelectionHandle> cert_selection_handle
|
|
291
|
+
ABSL_GUARDED_BY(mu);
|
|
292
|
+
// Will be set if the certificate selector is used and the asynchronous cert
|
|
293
|
+
// selection is done.
|
|
294
|
+
std::optional<absl::Status> cert_selection_status ABSL_GUARDED_BY(mu);
|
|
295
|
+
// This may be from the factory, or from the certificate selection result when
|
|
296
|
+
// the certificate selector is used.
|
|
297
|
+
std::shared_ptr<grpc_core::PrivateKeySigner> key_signer ABSL_GUARDED_BY(mu);
|
|
219
298
|
// The signed_bytes are populated when the signature process is completed if
|
|
220
299
|
// the Private Key offload was successful. If there was an error during the
|
|
221
300
|
// signature, the status will be returned.
|
|
@@ -226,17 +305,62 @@ struct tsi_ssl_handshaker : public tsi_handshaker,
|
|
|
226
305
|
#endif
|
|
227
306
|
};
|
|
228
307
|
|
|
308
|
+
void tsi_ssl_handshaker::MaybeRecordTelemetry(
|
|
309
|
+
const SslHandshakeResult& handshake_result) {
|
|
310
|
+
// If there's no collection scope, don't do anything regarding telemetry
|
|
311
|
+
if (collection_scope == nullptr) return;
|
|
312
|
+
if (handshake_result.tsi_handshake_result == TSI_INCOMPLETE_DATA ||
|
|
313
|
+
handshake_result.tsi_handshake_result == TSI_DRAIN_BUFFER) {
|
|
314
|
+
return;
|
|
315
|
+
}
|
|
316
|
+
// The handshaker can return TSI_OK as an intermediate state, only keep going
|
|
317
|
+
// if a result has been created
|
|
318
|
+
if (handshake_result.tsi_handshake_result == TSI_OK &&
|
|
319
|
+
!handshaker_result_created) {
|
|
320
|
+
return;
|
|
321
|
+
}
|
|
322
|
+
if (metric_recorded) return;
|
|
323
|
+
metric_recorded = true;
|
|
324
|
+
SSL* active_ssl = ssl;
|
|
325
|
+
if (active_ssl == nullptr && handshaker_next_args.has_value() &&
|
|
326
|
+
handshaker_next_args->handshaker_result != nullptr) {
|
|
327
|
+
auto* res = reinterpret_cast<tsi_ssl_handshaker_result*>(
|
|
328
|
+
handshaker_next_args->handshaker_result);
|
|
329
|
+
active_ssl = res->ssl;
|
|
330
|
+
}
|
|
331
|
+
absl::string_view resumed = active_ssl == nullptr ? "unknown"
|
|
332
|
+
: SSL_session_reused(active_ssl) ? "true"
|
|
333
|
+
: "false";
|
|
334
|
+
grpc_core::TlsTelemetryHandshakeResult result =
|
|
335
|
+
grpc_core::TlsTelemetryHandshakeResult::kSuccess;
|
|
336
|
+
if (handshake_result.tsi_handshake_result != TSI_OK) {
|
|
337
|
+
// If TSI reports non-ok, get more details from the SSL stack
|
|
338
|
+
long verify_res =
|
|
339
|
+
active_ssl != nullptr ? SSL_get_verify_result(active_ssl) : X509_V_OK;
|
|
340
|
+
result = grpc_core::MapSslErrorToTlsTelemetryHandshakeResult(
|
|
341
|
+
handshake_result.tsi_handshake_result, handshake_result.ssl_error,
|
|
342
|
+
handshake_result.err_code, verify_res);
|
|
343
|
+
}
|
|
344
|
+
absl::string_view status_str =
|
|
345
|
+
grpc_core::TlsTelemetryHandshakeResultToString(result);
|
|
346
|
+
if (is_client) {
|
|
347
|
+
auto storage = grpc_core::TlsClientHandshakeTelemetryDomain::GetStorage(
|
|
348
|
+
collection_scope, status_str, target, resumed, locality,
|
|
349
|
+
backend_service);
|
|
350
|
+
storage->Increment(
|
|
351
|
+
grpc_core::TlsClientHandshakeTelemetryDomain::kHandshakes);
|
|
352
|
+
} else {
|
|
353
|
+
auto storage = grpc_core::TlsServerHandshakeTelemetryDomain::GetStorage(
|
|
354
|
+
collection_scope, status_str, resumed);
|
|
355
|
+
storage->Increment(
|
|
356
|
+
grpc_core::TlsServerHandshakeTelemetryDomain::kHandshakes);
|
|
357
|
+
}
|
|
358
|
+
}
|
|
359
|
+
|
|
229
360
|
static std::pair<tsi_result, std::optional<HandshakerNextArgs>>
|
|
230
361
|
ssl_handshaker_next_async(tsi_ssl_handshaker* self)
|
|
231
362
|
ABSL_EXCLUSIVE_LOCKS_REQUIRED(&tsi_ssl_handshaker::mu);
|
|
232
363
|
|
|
233
|
-
struct tsi_ssl_handshaker_result {
|
|
234
|
-
tsi_handshaker_result base;
|
|
235
|
-
SSL* ssl;
|
|
236
|
-
BIO* network_io;
|
|
237
|
-
unsigned char* unused_bytes;
|
|
238
|
-
size_t unused_bytes_size;
|
|
239
|
-
};
|
|
240
364
|
struct tsi_ssl_frame_protector {
|
|
241
365
|
tsi_frame_protector base;
|
|
242
366
|
SSL* ssl;
|
|
@@ -367,6 +491,73 @@ int ServerHandshakerFactoryAlpnCallback(SSL* /*ssl*/, const unsigned char** out,
|
|
|
367
491
|
factory->alpn_protocol_list_length);
|
|
368
492
|
}
|
|
369
493
|
#endif // TSI_OPENSSL_ALPN_SUPPORT
|
|
494
|
+
|
|
495
|
+
// Populates the key exchange groups.
|
|
496
|
+
// Prefers the key exchange groups (input argument) configured by the user,
|
|
497
|
+
// otherwise uses the following defaults:
|
|
498
|
+
// - BoringSSL: {X25519MLKEM768, X25519, P-256, P-384, P-521}
|
|
499
|
+
// - OpenSSL < 3.0: {X25519, P-256, P-384, P-521}
|
|
500
|
+
// - OpenSSL >= 3: OpenSSL Defaults (prefers X25519MLKEM768 in OpenSSL 3.5+)
|
|
501
|
+
tsi_result SetKeyExchangeGroups(
|
|
502
|
+
SSL_CTX* context,
|
|
503
|
+
const std::vector<grpc_tls_key_exchange_group>& key_exchange_groups) {
|
|
504
|
+
// Explicitly set the key exchange groups based on user-provided preferences.
|
|
505
|
+
if (!key_exchange_groups.empty()) {
|
|
506
|
+
std::vector<absl::string_view> group_names;
|
|
507
|
+
group_names.reserve(key_exchange_groups.size());
|
|
508
|
+
for (const auto& group : key_exchange_groups) {
|
|
509
|
+
auto group_name = tsi::ConvertKeyExchangeGroupToString(group);
|
|
510
|
+
if (!group_name.ok()) {
|
|
511
|
+
LOG(ERROR) << "Could not convert key exchange group to string: "
|
|
512
|
+
<< group;
|
|
513
|
+
return TSI_INVALID_ARGUMENT;
|
|
514
|
+
}
|
|
515
|
+
group_names.push_back(*group_name);
|
|
516
|
+
}
|
|
517
|
+
#if OPENSSL_VERSION_NUMBER >= 0x10101000L
|
|
518
|
+
std::string group_list_str = absl::StrJoin(group_names, ":");
|
|
519
|
+
if (!SSL_CTX_set1_groups_list(context, group_list_str.c_str())) {
|
|
520
|
+
LOG(ERROR) << "Could not set key exchange groups: " << group_list_str;
|
|
521
|
+
return TSI_INTERNAL_ERROR;
|
|
522
|
+
}
|
|
523
|
+
SSL_CTX_set_options(context, SSL_OP_SINGLE_ECDH_USE);
|
|
524
|
+
#else
|
|
525
|
+
|
|
526
|
+
LOG(ERROR) << "Setting TLS key exchange groups is not supported when "
|
|
527
|
+
"building against OpenSSL versions < 1.1.1.";
|
|
528
|
+
return TSI_FAILED_PRECONDITION;
|
|
529
|
+
#endif // OPENSSL_VERSION_NUMBER >= 0x10100000
|
|
530
|
+
} else {
|
|
531
|
+
// Use defaults
|
|
532
|
+
#if defined(OPENSSL_IS_BORINGSSL)
|
|
533
|
+
if (!SSL_CTX_set1_groups_list(context,
|
|
534
|
+
kDefaultBoringSSLKeyExchangeGroups)) {
|
|
535
|
+
LOG(ERROR) << "Could not set default key exchange groups for BoringSSL.";
|
|
536
|
+
return TSI_INTERNAL_ERROR;
|
|
537
|
+
}
|
|
538
|
+
#elif OPENSSL_VERSION_NUMBER < 0x30000000L && \
|
|
539
|
+
OPENSSL_VERSION_NUMBER >= 0x10101000L
|
|
540
|
+
if (!SSL_CTX_set1_groups_list(context,
|
|
541
|
+
kDefaultOpenSSL1_1_1KeyExchangeGroups)) {
|
|
542
|
+
LOG(ERROR)
|
|
543
|
+
<< "Could not set default key exchange groups for OpenSSL 1.1.1.";
|
|
544
|
+
return TSI_INTERNAL_ERROR;
|
|
545
|
+
}
|
|
546
|
+
#elif OPENSSL_VERSION_NUMBER < 0x10101000L
|
|
547
|
+
if (!SSL_CTX_set1_curves_list(context,
|
|
548
|
+
kDefaultOpenSSL1_0_2KeyExchangeGroups)) {
|
|
549
|
+
LOG(ERROR)
|
|
550
|
+
<< "Could not set default key exchange groups for OpenSSL 1.0.2.";
|
|
551
|
+
return TSI_INTERNAL_ERROR;
|
|
552
|
+
}
|
|
553
|
+
if (!SSL_CTX_set_ecdh_auto(context, /*onoff=*/1)) {
|
|
554
|
+
LOG(ERROR) << "Could not set ecdh auto for OpenSSL 1.0.2.";
|
|
555
|
+
return TSI_INTERNAL_ERROR;
|
|
556
|
+
}
|
|
557
|
+
#endif
|
|
558
|
+
}
|
|
559
|
+
return TSI_OK;
|
|
560
|
+
}
|
|
370
561
|
} // namespace
|
|
371
562
|
|
|
372
563
|
static gpr_once g_init_openssl_once = GPR_ONCE_INIT;
|
|
@@ -393,7 +584,7 @@ void TlsOffloadSignDoneCallback(
|
|
|
393
584
|
std::optional<HandshakerNextArgs> next_args;
|
|
394
585
|
tsi_result result = TSI_INTERNAL_ERROR;
|
|
395
586
|
{
|
|
396
|
-
grpc_core::MutexLock lock(
|
|
587
|
+
grpc_core::MutexLock lock(handshaker->mu);
|
|
397
588
|
if (handshaker->is_shutdown) return;
|
|
398
589
|
handshaker->signed_bytes = std::move(signed_data);
|
|
399
590
|
handshaker->signing_handle.reset();
|
|
@@ -446,7 +637,7 @@ enum ssl_private_key_result_t TlsPrivateKeySignWrapper(
|
|
|
446
637
|
return ssl_private_key_failure;
|
|
447
638
|
}
|
|
448
639
|
if (handshaker->is_shutdown) {
|
|
449
|
-
handshaker->MaybeSetError("Handshaker is
|
|
640
|
+
handshaker->MaybeSetError("Handshaker is shutting down");
|
|
450
641
|
return ssl_private_key_failure;
|
|
451
642
|
}
|
|
452
643
|
// Create the completion callback by binding the current context.
|
|
@@ -487,13 +678,231 @@ const SSL_PRIVATE_KEY_METHOD TlsOffloadPrivateKeyMethod = {
|
|
|
487
678
|
TlsPrivateKeySignWrapper,
|
|
488
679
|
nullptr, // decrypt not implemented for this use case
|
|
489
680
|
TlsPrivateKeyOffloadComplete};
|
|
681
|
+
|
|
682
|
+
SelectCertificateInfo PrepareSelectCertificateInfo(
|
|
683
|
+
const SSL_CLIENT_HELLO* client_hello) {
|
|
684
|
+
SelectCertificateInfo select_cert_info;
|
|
685
|
+
const char* sni =
|
|
686
|
+
SSL_get_servername(client_hello->ssl, TLSEXT_NAMETYPE_host_name);
|
|
687
|
+
if (sni != nullptr) {
|
|
688
|
+
select_cert_info.sni = sni;
|
|
689
|
+
} else {
|
|
690
|
+
VLOG(2) << "Client did not provide SNI for cert selection.";
|
|
691
|
+
}
|
|
692
|
+
size_t capabilities_len = 0;
|
|
693
|
+
uint8_t* buffer;
|
|
694
|
+
bssl::ScopedCBB cbb;
|
|
695
|
+
if (CBB_init(cbb.get(), 128) &&
|
|
696
|
+
SSL_serialize_capabilities(client_hello->ssl, cbb.get()) &&
|
|
697
|
+
CBB_finish(cbb.get(), &buffer, &capabilities_len)) {
|
|
698
|
+
select_cert_info.handshake_hints_info.ssl_capabilities =
|
|
699
|
+
std::string(reinterpret_cast<const char*>(buffer), capabilities_len);
|
|
700
|
+
OPENSSL_free(buffer);
|
|
701
|
+
} else {
|
|
702
|
+
VLOG(2) << "Failed to generate SSL capabilities";
|
|
703
|
+
}
|
|
704
|
+
select_cert_info.handshake_hints_info.client_hello =
|
|
705
|
+
std::string(reinterpret_cast<const char*>(client_hello->client_hello),
|
|
706
|
+
client_hello->client_hello_len);
|
|
707
|
+
return select_cert_info;
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
absl::Status ProcessSelectCertResultForHandshakeHints(
|
|
711
|
+
tsi_ssl_handshaker* handshaker, const SelectCertificateResult& result) {
|
|
712
|
+
// If no handshake hints are provided, return early. This doesn't mean the
|
|
713
|
+
// handshake will fail. The private key operation will happen later.
|
|
714
|
+
if (result.handshake_hints_result.handshake_hints.empty()) {
|
|
715
|
+
return absl::OkStatus();
|
|
716
|
+
}
|
|
717
|
+
if (!SSL_set_min_proto_version(
|
|
718
|
+
handshaker->ssl, result.handshake_hints_result.min_tls_version)) {
|
|
719
|
+
return absl::InvalidArgumentError("Failed to set min TLS version.");
|
|
720
|
+
}
|
|
721
|
+
if (!SSL_set_max_proto_version(
|
|
722
|
+
handshaker->ssl, result.handshake_hints_result.max_tls_version)) {
|
|
723
|
+
return absl::InvalidArgumentError("Failed to set max TLS version.");
|
|
724
|
+
}
|
|
725
|
+
if (!result.handshake_hints_result.cipher_list.empty() &&
|
|
726
|
+
!SSL_set_strict_cipher_list(
|
|
727
|
+
handshaker->ssl, result.handshake_hints_result.cipher_list.c_str())) {
|
|
728
|
+
return absl::InvalidArgumentError("Failed to set cipher list.");
|
|
729
|
+
}
|
|
730
|
+
if (!result.handshake_hints_result.key_exchange_groups.empty() &&
|
|
731
|
+
!SSL_set1_group_ids(
|
|
732
|
+
handshaker->ssl,
|
|
733
|
+
result.handshake_hints_result.key_exchange_groups.data(),
|
|
734
|
+
result.handshake_hints_result.key_exchange_groups.size())) {
|
|
735
|
+
return absl::InvalidArgumentError("Failed to set key exchange groups.");
|
|
736
|
+
}
|
|
737
|
+
// No session resumption.
|
|
738
|
+
SSL_set_options(handshaker->ssl,
|
|
739
|
+
SSL_OP_CIPHER_SERVER_PREFERENCE | SSL_OP_NO_TICKET);
|
|
740
|
+
if (!SSL_set_handshake_hints(
|
|
741
|
+
handshaker->ssl,
|
|
742
|
+
reinterpret_cast<const uint8_t*>(
|
|
743
|
+
result.handshake_hints_result.handshake_hints.data()),
|
|
744
|
+
result.handshake_hints_result.handshake_hints.size())) {
|
|
745
|
+
return absl::InternalError("Failed to set handshake hints.");
|
|
746
|
+
}
|
|
747
|
+
return absl::OkStatus();
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
absl::Status ProcessSelectCertificateResult(tsi_ssl_handshaker* handshaker,
|
|
751
|
+
SelectCertificateResult result)
|
|
752
|
+
ABSL_EXCLUSIVE_LOCKS_REQUIRED(&tsi_ssl_handshaker::mu) {
|
|
753
|
+
if (result.certificate_chain.empty()) {
|
|
754
|
+
return absl::InvalidArgumentError("The cert chain is empty.");
|
|
755
|
+
}
|
|
756
|
+
std::vector<CRYPTO_BUFFER*> cert_chain;
|
|
757
|
+
cert_chain.reserve(result.certificate_chain.size());
|
|
758
|
+
for (auto& raw_cert : result.certificate_chain) {
|
|
759
|
+
cert_chain.push_back(raw_cert.get());
|
|
760
|
+
}
|
|
761
|
+
absl::Status pkey_status = grpc_core::MatchMutable(
|
|
762
|
+
&result.private_key,
|
|
763
|
+
[&](bssl::UniquePtr<EVP_PKEY>* key) {
|
|
764
|
+
VLOG(2) << "Select cert result returned a static private key.";
|
|
765
|
+
if (!SSL_set_chain_and_key(handshaker->ssl, cert_chain.data(),
|
|
766
|
+
cert_chain.size(), key->get(),
|
|
767
|
+
/*privkey_method=*/nullptr)) {
|
|
768
|
+
return absl::InternalError(
|
|
769
|
+
absl::StrFormat("Failed to set chain and key: %s",
|
|
770
|
+
tsi::SslErrorString(SSL_get_error(
|
|
771
|
+
handshaker->ssl, /*ret_code=*/0))));
|
|
772
|
+
}
|
|
773
|
+
return absl::OkStatus();
|
|
774
|
+
},
|
|
775
|
+
[&](std::shared_ptr<grpc_core::PrivateKeySigner>* signer)
|
|
776
|
+
ABSL_NO_THREAD_SAFETY_ANALYSIS {
|
|
777
|
+
VLOG(2) << "Select cert result returned a private key signer.";
|
|
778
|
+
handshaker->key_signer = std::move(*signer);
|
|
779
|
+
if (!SSL_set_chain_and_key(
|
|
780
|
+
handshaker->ssl, cert_chain.data(), cert_chain.size(),
|
|
781
|
+
/*privkey=*/nullptr, &TlsOffloadPrivateKeyMethod)) {
|
|
782
|
+
return absl::InternalError(
|
|
783
|
+
absl::StrFormat("Failed to set chain and key: %s",
|
|
784
|
+
tsi::SslErrorString(SSL_get_error(
|
|
785
|
+
handshaker->ssl, /*ret_code=*/0))));
|
|
786
|
+
}
|
|
787
|
+
return absl::OkStatus();
|
|
788
|
+
});
|
|
789
|
+
GRPC_RETURN_IF_ERROR(pkey_status);
|
|
790
|
+
return ProcessSelectCertResultForHandshakeHints(handshaker, result);
|
|
791
|
+
}
|
|
792
|
+
|
|
793
|
+
// Invoked by the cert selector when it runs asynchronously.
|
|
794
|
+
void OnSelectCertificateDone(
|
|
795
|
+
grpc_core::RefCountedPtr<tsi_ssl_handshaker> handshaker,
|
|
796
|
+
absl::StatusOr<SelectCertificateResult> result) {
|
|
797
|
+
grpc_core::ExecCtx exec_ctx;
|
|
798
|
+
tsi_result next_result;
|
|
799
|
+
std::optional<HandshakerNextArgs> next_args;
|
|
800
|
+
{
|
|
801
|
+
grpc_core::MutexLock lock(handshaker->mu);
|
|
802
|
+
if (handshaker->is_shutdown) return;
|
|
803
|
+
if (!result.ok()) {
|
|
804
|
+
VLOG(2) << "SelectCertificate failed " << result.status();
|
|
805
|
+
handshaker->cert_selection_status = std::move(result).status();
|
|
806
|
+
} else {
|
|
807
|
+
handshaker->cert_selection_status =
|
|
808
|
+
ProcessSelectCertificateResult(handshaker.get(), *std::move(result));
|
|
809
|
+
}
|
|
810
|
+
handshaker->cert_selection_handle.reset();
|
|
811
|
+
auto async_result = ssl_handshaker_next_async(handshaker.get());
|
|
812
|
+
next_result = async_result.first;
|
|
813
|
+
next_args = std::move(async_result.second);
|
|
814
|
+
}
|
|
815
|
+
// If result is not TSI_ASYNC and there are args, we are ready to flush.
|
|
816
|
+
if (next_result != TSI_ASYNC && next_args.has_value() &&
|
|
817
|
+
next_args->cb != nullptr) {
|
|
818
|
+
next_args->cb(next_result, next_args->user_data, next_args->bytes_to_send,
|
|
819
|
+
next_args->bytes_to_send_size, next_args->handshaker_result);
|
|
820
|
+
}
|
|
821
|
+
}
|
|
822
|
+
|
|
823
|
+
grpc_core::CertificateSelector* GetCertificateSelector(
|
|
824
|
+
tsi_ssl_handshaker* handshaker) {
|
|
825
|
+
if (handshaker->is_client) {
|
|
826
|
+
return nullptr;
|
|
827
|
+
}
|
|
828
|
+
return reinterpret_cast<tsi_ssl_server_handshaker_factory*>(
|
|
829
|
+
handshaker->factory_ref)
|
|
830
|
+
->certificate_selector.get();
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
// Invoked by BoringSSL to get the result of cert selection.
|
|
834
|
+
ssl_select_cert_result_t SelectCertificateCallback(
|
|
835
|
+
const SSL_CLIENT_HELLO* client_hello)
|
|
836
|
+
ABSL_EXCLUSIVE_LOCKS_REQUIRED(&tsi_ssl_handshaker::mu) {
|
|
837
|
+
tsi_ssl_handshaker* handshaker = GetHandshaker(client_hello->ssl);
|
|
838
|
+
// Sanity check. Should never happen.
|
|
839
|
+
if (handshaker == nullptr || client_hello == nullptr) {
|
|
840
|
+
handshaker->MaybeSetError(
|
|
841
|
+
"SelectCertificateCallback failed because handshaker or client_hello "
|
|
842
|
+
"is nullptr; this should never happen.");
|
|
843
|
+
return ssl_select_cert_error;
|
|
844
|
+
}
|
|
845
|
+
grpc_core::CertificateSelector* cert_selector =
|
|
846
|
+
GetCertificateSelector(handshaker);
|
|
847
|
+
if (cert_selector == nullptr) {
|
|
848
|
+
handshaker->MaybeSetError(
|
|
849
|
+
"SelectCertificateCallback failed because certificate selector "
|
|
850
|
+
"is nullptr; this should never happen.");
|
|
851
|
+
return ssl_select_cert_error;
|
|
852
|
+
}
|
|
853
|
+
// The async cert selection is finished.
|
|
854
|
+
if (handshaker->cert_selection_status.has_value()) {
|
|
855
|
+
if (!handshaker->cert_selection_status->ok()) {
|
|
856
|
+
VLOG(2) << "Async cert selection failed: "
|
|
857
|
+
<< *handshaker->cert_selection_status;
|
|
858
|
+
handshaker->MaybeSetError(handshaker->cert_selection_status->ToString());
|
|
859
|
+
return ssl_select_cert_error;
|
|
860
|
+
}
|
|
861
|
+
// The cert selection is done.
|
|
862
|
+
return ssl_select_cert_success;
|
|
863
|
+
}
|
|
864
|
+
// The callback holds a ref to the handshaker to ensure it's not destroyed
|
|
865
|
+
// when the callback is invoked asynchronously.
|
|
866
|
+
std::variant<absl::StatusOr<SelectCertificateResult>,
|
|
867
|
+
std::shared_ptr<AsyncCertificateSelectionHandle>>
|
|
868
|
+
result = cert_selector->SelectCertificate(
|
|
869
|
+
PrepareSelectCertificateInfo(client_hello),
|
|
870
|
+
absl::bind_front(OnSelectCertificateDone, handshaker->Ref()));
|
|
871
|
+
// The outer function guarantees the mutex lock, and we have to disable the
|
|
872
|
+
// absl thread safety analysis because the use of MatchMutable.
|
|
873
|
+
return grpc_core::MatchMutable(
|
|
874
|
+
&result,
|
|
875
|
+
[&](absl::StatusOr<SelectCertificateResult>* select_cert_result)
|
|
876
|
+
ABSL_NO_THREAD_SAFETY_ANALYSIS {
|
|
877
|
+
if (!select_cert_result->ok()) {
|
|
878
|
+
VLOG(2) << "Sync select cert failed: "
|
|
879
|
+
<< select_cert_result->status();
|
|
880
|
+
handshaker->MaybeSetError(
|
|
881
|
+
select_cert_result->status().ToString());
|
|
882
|
+
return ssl_select_cert_error;
|
|
883
|
+
}
|
|
884
|
+
absl::Status status = ProcessSelectCertificateResult(
|
|
885
|
+
handshaker, *std::move(*select_cert_result));
|
|
886
|
+
if (!status.ok()) {
|
|
887
|
+
LOG(INFO) << "Sync select cert failed: " << status;
|
|
888
|
+
handshaker->MaybeSetError(status.ToString());
|
|
889
|
+
return ssl_select_cert_error;
|
|
890
|
+
}
|
|
891
|
+
return ssl_select_cert_success;
|
|
892
|
+
},
|
|
893
|
+
[&](std::shared_ptr<AsyncCertificateSelectionHandle>* async_handle)
|
|
894
|
+
ABSL_NO_THREAD_SAFETY_ANALYSIS {
|
|
895
|
+
handshaker->cert_selection_handle = std::move(*async_handle);
|
|
896
|
+
return ssl_select_cert_retry;
|
|
897
|
+
});
|
|
898
|
+
}
|
|
490
899
|
#endif // defined(OPENSSL_IS_BORINGSSL)
|
|
491
900
|
|
|
492
901
|
#if !defined(OPENSSL_IS_BORINGSSL) && !defined(OPENSSL_NO_ENGINE)
|
|
493
902
|
static const char kSslEnginePrefix[] = "engine:";
|
|
494
903
|
#endif
|
|
495
904
|
|
|
496
|
-
#if OPENSSL_VERSION_NUMBER <
|
|
905
|
+
#if OPENSSL_VERSION_NUMBER < 0x10101000L
|
|
497
906
|
static gpr_mu* g_openssl_mutexes = nullptr;
|
|
498
907
|
static void openssl_locking_cb(int mode, int type, const char* file,
|
|
499
908
|
int line) GRPC_UNUSED;
|
|
@@ -519,39 +928,14 @@ static void verified_root_cert_free(void* /*parent*/, void* ptr,
|
|
|
519
928
|
}
|
|
520
929
|
|
|
521
930
|
static void init_openssl(void) {
|
|
522
|
-
#if OPENSSL_VERSION_NUMBER >=
|
|
523
|
-
OPENSSL_init_ssl(
|
|
524
|
-
// Ensure OPENSSL global clean up happens after gRPC shutdown completes.
|
|
525
|
-
// OPENSSL registers an exit handler to clean up global objects, which
|
|
526
|
-
// otherwise may happen before gRPC removes all references to OPENSSL. Below
|
|
527
|
-
// exit handler is guaranteed to run after OPENSSL's.
|
|
528
|
-
std::atexit([]() {
|
|
529
|
-
// Retrieve the OpenSSL cleanup timeout from the environment variable.
|
|
530
|
-
// This allows users to override the default cleanup timeout for OpenSSL
|
|
531
|
-
// resource deallocation during gRPC shutdown.
|
|
532
|
-
std::optional<std::string> env =
|
|
533
|
-
grpc_core::GetEnv(GRPC_ARG_OPENSSL_CLEANUP_TIMEOUT_ENV);
|
|
534
|
-
int timeout_sec = 2;
|
|
535
|
-
if (env.has_value()) {
|
|
536
|
-
int parsed_timeout_sec = 0;
|
|
537
|
-
if (absl::SimpleAtoi(*env, &parsed_timeout_sec)) {
|
|
538
|
-
timeout_sec = parsed_timeout_sec;
|
|
539
|
-
} else {
|
|
540
|
-
GRPC_TRACE_LOG(tsi, ERROR)
|
|
541
|
-
<< "Invalid value [" << (*env) << "] for "
|
|
542
|
-
<< GRPC_ARG_OPENSSL_CLEANUP_TIMEOUT_ENV
|
|
543
|
-
<< " environment variable. Using default value of 2 seconds.";
|
|
544
|
-
}
|
|
545
|
-
}
|
|
546
|
-
|
|
547
|
-
grpc_wait_for_shutdown_with_timeout(absl::Seconds(timeout_sec));
|
|
548
|
-
});
|
|
931
|
+
#if OPENSSL_VERSION_NUMBER >= 0x10101000L
|
|
932
|
+
OPENSSL_init_ssl(OPENSSL_INIT_NO_ATEXIT, nullptr);
|
|
549
933
|
#else
|
|
550
934
|
SSL_library_init();
|
|
551
935
|
SSL_load_error_strings();
|
|
552
936
|
OpenSSL_add_all_algorithms();
|
|
553
937
|
#endif
|
|
554
|
-
#if OPENSSL_VERSION_NUMBER <
|
|
938
|
+
#if OPENSSL_VERSION_NUMBER < 0x10101000L
|
|
555
939
|
if (!CRYPTO_get_locking_callback()) {
|
|
556
940
|
int num_locks = CRYPTO_num_locks();
|
|
557
941
|
GRPC_CHECK_GT(num_locks, 0);
|
|
@@ -639,9 +1023,7 @@ static int looks_like_ip_address(absl::string_view name) {
|
|
|
639
1023
|
static tsi_result ssl_get_x509_common_name(X509* cert, unsigned char** utf8,
|
|
640
1024
|
size_t* utf8_size) {
|
|
641
1025
|
int common_name_index = -1;
|
|
642
|
-
|
|
643
|
-
ASN1_STRING* common_name_asn1 = nullptr;
|
|
644
|
-
X509_NAME* subject_name = X509_get_subject_name(cert);
|
|
1026
|
+
auto* subject_name = X509_get_subject_name(cert);
|
|
645
1027
|
int utf8_returned_size = 0;
|
|
646
1028
|
if (subject_name == nullptr) {
|
|
647
1029
|
VLOG(2) << "Could not get subject name from certificate.";
|
|
@@ -653,12 +1035,13 @@ static tsi_result ssl_get_x509_common_name(X509* cert, unsigned char** utf8,
|
|
|
653
1035
|
VLOG(2) << "Could not get common name of subject from certificate.";
|
|
654
1036
|
return TSI_NOT_FOUND;
|
|
655
1037
|
}
|
|
656
|
-
common_name_entry =
|
|
1038
|
+
auto* common_name_entry =
|
|
1039
|
+
X509_NAME_get_entry(subject_name, common_name_index);
|
|
657
1040
|
if (common_name_entry == nullptr) {
|
|
658
1041
|
LOG(ERROR) << "Could not get common name entry from certificate.";
|
|
659
1042
|
return TSI_INTERNAL_ERROR;
|
|
660
1043
|
}
|
|
661
|
-
common_name_asn1 = X509_NAME_ENTRY_get_data(common_name_entry);
|
|
1044
|
+
auto* common_name_asn1 = X509_NAME_ENTRY_get_data(common_name_entry);
|
|
662
1045
|
if (common_name_asn1 == nullptr) {
|
|
663
1046
|
LOG(ERROR) << "Could not get common name entry asn1 from certificate.";
|
|
664
1047
|
return TSI_INTERNAL_ERROR;
|
|
@@ -699,7 +1082,7 @@ static tsi_result peer_property_from_x509_common_name(
|
|
|
699
1082
|
static tsi_result peer_property_from_x509_subject(X509* cert,
|
|
700
1083
|
tsi_peer_property* property,
|
|
701
1084
|
bool is_verified_root_cert) {
|
|
702
|
-
|
|
1085
|
+
auto* subject_name = X509_get_subject_name(cert);
|
|
703
1086
|
if (subject_name == nullptr) {
|
|
704
1087
|
GRPC_TRACE_LOG(tsi, INFO) << "Could not get subject name from certificate.";
|
|
705
1088
|
return TSI_NOT_FOUND;
|
|
@@ -795,17 +1178,30 @@ static tsi_result add_subject_alt_names_properties_to_peer(
|
|
|
795
1178
|
char ntop_buf[INET6_ADDRSTRLEN];
|
|
796
1179
|
int af;
|
|
797
1180
|
|
|
1181
|
+
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
|
|
1182
|
+
if (ASN1_STRING_length(subject_alt_name->d.iPAddress) == 4) {
|
|
1183
|
+
af = AF_INET;
|
|
1184
|
+
} else if (ASN1_STRING_length(subject_alt_name->d.iPAddress) == 16) {
|
|
1185
|
+
af = AF_INET6;
|
|
1186
|
+
#else
|
|
798
1187
|
if (subject_alt_name->d.iPAddress->length == 4) {
|
|
799
1188
|
af = AF_INET;
|
|
800
1189
|
} else if (subject_alt_name->d.iPAddress->length == 16) {
|
|
801
1190
|
af = AF_INET6;
|
|
1191
|
+
#endif
|
|
802
1192
|
} else {
|
|
803
1193
|
LOG(ERROR) << "SAN IP Address contained invalid IP";
|
|
804
1194
|
result = TSI_INTERNAL_ERROR;
|
|
805
1195
|
break;
|
|
806
1196
|
}
|
|
1197
|
+
#if OPENSSL_VERSION_NUMBER >= 0x10100000L
|
|
1198
|
+
const char* name =
|
|
1199
|
+
inet_ntop(af, ASN1_STRING_get0_data(subject_alt_name->d.iPAddress),
|
|
1200
|
+
ntop_buf, INET6_ADDRSTRLEN);
|
|
1201
|
+
#else
|
|
807
1202
|
const char* name = inet_ntop(af, subject_alt_name->d.iPAddress->data,
|
|
808
1203
|
ntop_buf, INET6_ADDRSTRLEN);
|
|
1204
|
+
#endif
|
|
809
1205
|
if (name == nullptr) {
|
|
810
1206
|
LOG(ERROR) << "Could not get IP string from asn1 octet.";
|
|
811
1207
|
result = TSI_INTERNAL_ERROR;
|
|
@@ -894,9 +1290,11 @@ static tsi_result peer_from_x509(X509* cert, int include_certificate_type,
|
|
|
894
1290
|
if (subject_alt_names != nullptr) {
|
|
895
1291
|
sk_GENERAL_NAME_pop_free(subject_alt_names, GENERAL_NAME_free);
|
|
896
1292
|
}
|
|
897
|
-
if (result != TSI_OK)
|
|
898
|
-
|
|
899
|
-
|
|
1293
|
+
if (result != TSI_OK) {
|
|
1294
|
+
tsi_peer_destruct(peer);
|
|
1295
|
+
} else {
|
|
1296
|
+
GRPC_CHECK((int)peer->property_count == current_insert_index);
|
|
1297
|
+
}
|
|
900
1298
|
return result;
|
|
901
1299
|
}
|
|
902
1300
|
|
|
@@ -1088,13 +1486,13 @@ static tsi_result x509_store_load_certs(X509_STORE* cert_store,
|
|
|
1088
1486
|
break; // We're at the end of stream.
|
|
1089
1487
|
}
|
|
1090
1488
|
if (root_names != nullptr) {
|
|
1091
|
-
|
|
1092
|
-
if (
|
|
1489
|
+
auto* root_subject = X509_get_subject_name(root);
|
|
1490
|
+
if (root_subject == nullptr) {
|
|
1093
1491
|
LOG(ERROR) << "Could not get name from root certificate.";
|
|
1094
1492
|
result = TSI_INVALID_ARGUMENT;
|
|
1095
1493
|
break;
|
|
1096
1494
|
}
|
|
1097
|
-
root_name = X509_NAME_dup(
|
|
1495
|
+
root_name = X509_NAME_dup(const_cast<X509_NAME*>(root_subject));
|
|
1098
1496
|
if (root_name == nullptr) {
|
|
1099
1497
|
result = TSI_OUT_OF_RESOURCES;
|
|
1100
1498
|
break;
|
|
@@ -1147,22 +1545,22 @@ static tsi_result ssl_ctx_load_verification_certs(SSL_CTX* context,
|
|
|
1147
1545
|
// Populates the SSL context with a private key and a cert chain, and sets the
|
|
1148
1546
|
// cipher list and the ephemeral ECDH key.
|
|
1149
1547
|
static tsi_result populate_ssl_context(
|
|
1150
|
-
SSL_CTX* context, const
|
|
1548
|
+
SSL_CTX* context, const grpc_core::PemKeyCertPair* key_cert_pair,
|
|
1151
1549
|
const char* cipher_list,
|
|
1152
1550
|
const std::vector<grpc_tls_key_exchange_group>& key_exchange_groups) {
|
|
1153
1551
|
tsi_result result = TSI_OK;
|
|
1154
1552
|
if (key_cert_pair != nullptr) {
|
|
1155
|
-
if (!key_cert_pair->cert_chain.empty()) {
|
|
1553
|
+
if (!key_cert_pair->cert_chain().empty()) {
|
|
1156
1554
|
result = ssl_ctx_use_certificate_chain(
|
|
1157
|
-
context, key_cert_pair->cert_chain.c_str(),
|
|
1158
|
-
key_cert_pair->cert_chain.length());
|
|
1555
|
+
context, key_cert_pair->cert_chain().c_str(),
|
|
1556
|
+
key_cert_pair->cert_chain().length());
|
|
1159
1557
|
if (result != TSI_OK) {
|
|
1160
1558
|
LOG(ERROR) << "Invalid cert chain file.";
|
|
1161
1559
|
return result;
|
|
1162
1560
|
}
|
|
1163
1561
|
}
|
|
1164
1562
|
result = grpc_core::Match(
|
|
1165
|
-
key_cert_pair->private_key,
|
|
1563
|
+
key_cert_pair->private_key(),
|
|
1166
1564
|
[&](const std::string& pem_root_certs) {
|
|
1167
1565
|
tsi_result result = TSI_OK;
|
|
1168
1566
|
result = ssl_ctx_use_private_key(context, pem_root_certs.data(),
|
|
@@ -1193,40 +1591,9 @@ static tsi_result populate_ssl_context(
|
|
|
1193
1591
|
LOG(ERROR) << "Invalid cipher list: " << cipher_list;
|
|
1194
1592
|
return TSI_INVALID_ARGUMENT;
|
|
1195
1593
|
}
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
for (const auto& group : key_exchange_groups) {
|
|
1200
|
-
auto group_name = tsi::ConvertKeyExchangeGroupToString(group);
|
|
1201
|
-
if (!group_name.ok()) {
|
|
1202
|
-
LOG(ERROR) << "Could not convert key exchange group to string.";
|
|
1203
|
-
return TSI_INVALID_ARGUMENT;
|
|
1204
|
-
}
|
|
1205
|
-
group_names.push_back(*group_name);
|
|
1206
|
-
}
|
|
1207
|
-
#if OPENSSL_VERSION_NUMBER >= 0x10101000L
|
|
1208
|
-
std::string group_list_str = absl::StrJoin(group_names, ":");
|
|
1209
|
-
if (!SSL_CTX_set1_groups_list(context, group_list_str.c_str())) {
|
|
1210
|
-
LOG(ERROR) << "Could not set key exchange groups: " << group_list_str;
|
|
1211
|
-
return TSI_INTERNAL_ERROR;
|
|
1212
|
-
}
|
|
1213
|
-
SSL_CTX_set_options(context, SSL_OP_SINGLE_ECDH_USE);
|
|
1214
|
-
#else
|
|
1215
|
-
LOG(ERROR) << "SSL_CTX_set1_groups is not supported in OpenSSL < 1.1.1 "
|
|
1216
|
-
"version.";
|
|
1217
|
-
return TSI_FAILED_PRECONDITION;
|
|
1218
|
-
#endif // OPENSSL_VERSION_NUMBER >= 0x10100000
|
|
1219
|
-
} else {
|
|
1220
|
-
#if OPENSSL_VERSION_NUMBER < 0x30000000L
|
|
1221
|
-
EC_KEY* ecdh = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1);
|
|
1222
|
-
if (!SSL_CTX_set_tmp_ecdh(context, ecdh)) {
|
|
1223
|
-
LOG(ERROR) << "Could not set ephemeral ECDH key.";
|
|
1224
|
-
EC_KEY_free(ecdh);
|
|
1225
|
-
return TSI_INTERNAL_ERROR;
|
|
1226
|
-
}
|
|
1227
|
-
SSL_CTX_set_options(context, SSL_OP_SINGLE_ECDH_USE);
|
|
1228
|
-
EC_KEY_free(ecdh);
|
|
1229
|
-
#endif
|
|
1594
|
+
result = SetKeyExchangeGroups(context, key_exchange_groups);
|
|
1595
|
+
if (result != TSI_OK) {
|
|
1596
|
+
return result;
|
|
1230
1597
|
}
|
|
1231
1598
|
return TSI_OK;
|
|
1232
1599
|
}
|
|
@@ -1713,8 +2080,8 @@ static tsi_result tsi_set_min_and_max_tls_versions(
|
|
|
1713
2080
|
// --- tsi_ssl_root_certs_store methods implementation. ---
|
|
1714
2081
|
|
|
1715
2082
|
tsi_ssl_root_certs_store* tsi_ssl_root_certs_store_create(
|
|
1716
|
-
|
|
1717
|
-
if (pem_roots
|
|
2083
|
+
absl::string_view pem_roots) {
|
|
2084
|
+
if (pem_roots.empty()) {
|
|
1718
2085
|
LOG(ERROR) << "The root certificates are empty.";
|
|
1719
2086
|
return nullptr;
|
|
1720
2087
|
}
|
|
@@ -1730,8 +2097,8 @@ tsi_ssl_root_certs_store* tsi_ssl_root_certs_store_create(
|
|
|
1730
2097
|
gpr_free(root_store);
|
|
1731
2098
|
return nullptr;
|
|
1732
2099
|
}
|
|
1733
|
-
tsi_result result = x509_store_load_certs(root_store->store, pem_roots,
|
|
1734
|
-
|
|
2100
|
+
tsi_result result = x509_store_load_certs(root_store->store, pem_roots.data(),
|
|
2101
|
+
pem_roots.size(), nullptr);
|
|
1735
2102
|
if (result != TSI_OK) {
|
|
1736
2103
|
LOG(ERROR) << "Could not load root certificates.";
|
|
1737
2104
|
X509_STORE_free(root_store->store);
|
|
@@ -1925,6 +2292,9 @@ static tsi_result ssl_handshaker_result_extract_peer(
|
|
|
1925
2292
|
// the peer's certificate is not present in the stack
|
|
1926
2293
|
STACK_OF(X509)* peer_chain = SSL_get_peer_cert_chain(impl->ssl);
|
|
1927
2294
|
|
|
2295
|
+
const char* server_name =
|
|
2296
|
+
SSL_get_servername(impl->ssl, TLSEXT_NAMETYPE_host_name);
|
|
2297
|
+
const char* tls_version = SSL_get_version(impl->ssl);
|
|
1928
2298
|
X509* verified_root_cert = static_cast<X509*>(
|
|
1929
2299
|
SSL_get_ex_data(impl->ssl, g_ssl_ex_verified_root_cert_index));
|
|
1930
2300
|
// 1 is for session reused property.
|
|
@@ -1932,6 +2302,14 @@ static tsi_result ssl_handshaker_result_extract_peer(
|
|
|
1932
2302
|
if (alpn_selected != nullptr) new_property_count++;
|
|
1933
2303
|
if (peer_chain != nullptr) new_property_count++;
|
|
1934
2304
|
if (verified_root_cert != nullptr) new_property_count++;
|
|
2305
|
+
if (server_name != nullptr) new_property_count++;
|
|
2306
|
+
if (tls_version != nullptr) new_property_count++;
|
|
2307
|
+
#if defined(OPENSSL_IS_BORINGSSL) || OPENSSL_VERSION_NUMBER >= 0x30000000L
|
|
2308
|
+
int nid = SSL_get_negotiated_group(impl->ssl);
|
|
2309
|
+
const char* negotiated_group_name =
|
|
2310
|
+
(nid != NID_undef && nid != 0) ? OBJ_nid2sn(nid) : nullptr;
|
|
2311
|
+
if (negotiated_group_name != nullptr) new_property_count++;
|
|
2312
|
+
#endif
|
|
1935
2313
|
tsi_peer_property* new_properties = static_cast<tsi_peer_property*>(
|
|
1936
2314
|
gpr_zalloc(sizeof(*new_properties) * new_property_count));
|
|
1937
2315
|
for (size_t i = 0; i < peer->property_count; i++) {
|
|
@@ -1968,6 +2346,20 @@ static tsi_result ssl_handshaker_result_extract_peer(
|
|
|
1968
2346
|
if (result != TSI_OK) return result;
|
|
1969
2347
|
peer->property_count++;
|
|
1970
2348
|
|
|
2349
|
+
if (server_name != nullptr) {
|
|
2350
|
+
result = tsi_construct_string_peer_property_from_cstring(
|
|
2351
|
+
TSI_SSL_REQUESTED_SERVER_NAME_PEER_PROPERTY, server_name,
|
|
2352
|
+
&peer->properties[peer->property_count]);
|
|
2353
|
+
if (result != TSI_OK) return result;
|
|
2354
|
+
peer->property_count++;
|
|
2355
|
+
}
|
|
2356
|
+
if (tls_version != nullptr) {
|
|
2357
|
+
result = tsi_construct_string_peer_property_from_cstring(
|
|
2358
|
+
TSI_SSL_TLS_VERSION_PEER_PROPERTY, tls_version,
|
|
2359
|
+
&peer->properties[peer->property_count]);
|
|
2360
|
+
if (result != TSI_OK) return result;
|
|
2361
|
+
peer->property_count++;
|
|
2362
|
+
}
|
|
1971
2363
|
if (verified_root_cert != nullptr) {
|
|
1972
2364
|
result = peer_property_from_x509_subject(
|
|
1973
2365
|
verified_root_cert, &peer->properties[peer->property_count], true);
|
|
@@ -1978,6 +2370,16 @@ static tsi_result ssl_handshaker_result_extract_peer(
|
|
|
1978
2370
|
peer->property_count++;
|
|
1979
2371
|
}
|
|
1980
2372
|
|
|
2373
|
+
#if defined(OPENSSL_IS_BORINGSSL) || OPENSSL_VERSION_NUMBER >= 0x30000000L
|
|
2374
|
+
if (negotiated_group_name != nullptr) {
|
|
2375
|
+
result = tsi_construct_string_peer_property_from_cstring(
|
|
2376
|
+
TSI_SSL_NEGOTIATED_KEY_EXCHANGE_GROUP, negotiated_group_name,
|
|
2377
|
+
&peer->properties[peer->property_count]);
|
|
2378
|
+
if (result != TSI_OK) return result;
|
|
2379
|
+
peer->property_count++;
|
|
2380
|
+
}
|
|
2381
|
+
#endif
|
|
2382
|
+
|
|
1981
2383
|
return result;
|
|
1982
2384
|
}
|
|
1983
2385
|
|
|
@@ -2120,11 +2522,11 @@ static tsi_result ssl_handshaker_get_result(tsi_ssl_handshaker* impl) {
|
|
|
2120
2522
|
return impl->result;
|
|
2121
2523
|
}
|
|
2122
2524
|
|
|
2123
|
-
static
|
|
2525
|
+
static SslHandshakeResult ssl_handshaker_do_handshake(tsi_ssl_handshaker* impl)
|
|
2124
2526
|
ABSL_EXCLUSIVE_LOCKS_REQUIRED(&tsi_ssl_handshaker::mu) {
|
|
2125
2527
|
if (ssl_handshaker_get_result(impl) != TSI_HANDSHAKE_IN_PROGRESS) {
|
|
2126
2528
|
impl->result = TSI_OK;
|
|
2127
|
-
return impl->result;
|
|
2529
|
+
return {impl->result, SSL_ERROR_NONE, 0};
|
|
2128
2530
|
} else {
|
|
2129
2531
|
ERR_clear_error();
|
|
2130
2532
|
// Get ready to get some bytes from SSL.
|
|
@@ -2134,21 +2536,24 @@ static tsi_result ssl_handshaker_do_handshake(tsi_ssl_handshaker* impl)
|
|
|
2134
2536
|
case SSL_ERROR_WANT_READ:
|
|
2135
2537
|
if (BIO_pending(impl->network_io) == 0) {
|
|
2136
2538
|
// We need more data.
|
|
2137
|
-
return TSI_INCOMPLETE_DATA;
|
|
2539
|
+
return {TSI_INCOMPLETE_DATA, SSL_ERROR_NONE, 0};
|
|
2138
2540
|
} else {
|
|
2139
|
-
return TSI_OK;
|
|
2541
|
+
return {TSI_OK, SSL_ERROR_NONE, 0};
|
|
2140
2542
|
}
|
|
2141
2543
|
case SSL_ERROR_NONE:
|
|
2142
|
-
return TSI_OK;
|
|
2544
|
+
return {TSI_OK, SSL_ERROR_NONE, 0};
|
|
2143
2545
|
case SSL_ERROR_WANT_WRITE:
|
|
2144
|
-
return TSI_DRAIN_BUFFER;
|
|
2546
|
+
return {TSI_DRAIN_BUFFER, SSL_ERROR_NONE, 0};
|
|
2145
2547
|
#if defined(OPENSSL_IS_BORINGSSL)
|
|
2146
2548
|
case SSL_ERROR_WANT_PRIVATE_KEY_OPERATION:
|
|
2147
|
-
return TSI_ASYNC;
|
|
2549
|
+
return {TSI_ASYNC, SSL_ERROR_NONE, 0};
|
|
2550
|
+
case SSL_ERROR_PENDING_CERTIFICATE:
|
|
2551
|
+
return {TSI_ASYNC, SSL_ERROR_NONE, 0};
|
|
2148
2552
|
#endif
|
|
2149
2553
|
default: {
|
|
2150
2554
|
char err_str[256];
|
|
2151
|
-
|
|
2555
|
+
unsigned long err_code = ERR_get_error();
|
|
2556
|
+
ERR_error_string_n(err_code, err_str, sizeof(err_str));
|
|
2152
2557
|
long verify_result = SSL_get_verify_result(impl->ssl);
|
|
2153
2558
|
std::string verify_result_str;
|
|
2154
2559
|
if (verify_result != X509_V_OK) {
|
|
@@ -2167,19 +2572,19 @@ static tsi_result ssl_handshaker_do_handshake(tsi_ssl_handshaker* impl)
|
|
|
2167
2572
|
err_str, verify_result_str,
|
|
2168
2573
|
signer_error));
|
|
2169
2574
|
impl->result = TSI_PROTOCOL_FAILURE;
|
|
2170
|
-
return impl->result;
|
|
2575
|
+
return {impl->result, ssl_result, err_code};
|
|
2171
2576
|
}
|
|
2172
2577
|
}
|
|
2173
2578
|
}
|
|
2174
2579
|
}
|
|
2175
2580
|
|
|
2176
|
-
static
|
|
2581
|
+
static SslHandshakeResult ssl_handshaker_process_bytes_from_peer(
|
|
2177
2582
|
tsi_ssl_handshaker* impl, const unsigned char* bytes, size_t* bytes_size)
|
|
2178
2583
|
ABSL_EXCLUSIVE_LOCKS_REQUIRED(&tsi_ssl_handshaker::mu) {
|
|
2179
2584
|
int bytes_written_into_ssl_size = 0;
|
|
2180
2585
|
if (bytes == nullptr || bytes_size == nullptr || *bytes_size > INT_MAX) {
|
|
2181
2586
|
impl->MaybeSetError("invalid argument");
|
|
2182
|
-
return TSI_INVALID_ARGUMENT;
|
|
2587
|
+
return {TSI_INVALID_ARGUMENT, SSL_ERROR_NONE, 0};
|
|
2183
2588
|
}
|
|
2184
2589
|
GRPC_CHECK_LE(*bytes_size, static_cast<size_t>(INT_MAX));
|
|
2185
2590
|
bytes_written_into_ssl_size =
|
|
@@ -2188,7 +2593,7 @@ static tsi_result ssl_handshaker_process_bytes_from_peer(
|
|
|
2188
2593
|
LOG(ERROR) << "Could not write to memory BIO.";
|
|
2189
2594
|
impl->MaybeSetError("could not write to memory BIO");
|
|
2190
2595
|
impl->result = TSI_INTERNAL_ERROR;
|
|
2191
|
-
return impl->result;
|
|
2596
|
+
return {impl->result, SSL_ERROR_NONE, 0};
|
|
2192
2597
|
}
|
|
2193
2598
|
*bytes_size = static_cast<size_t>(bytes_written_into_ssl_size);
|
|
2194
2599
|
return ssl_handshaker_do_handshake(impl);
|
|
@@ -2257,10 +2662,10 @@ static tsi_result ssl_handshaker_write_output_buffer(tsi_ssl_handshaker* impl,
|
|
|
2257
2662
|
return status;
|
|
2258
2663
|
}
|
|
2259
2664
|
|
|
2260
|
-
static
|
|
2665
|
+
static SslHandshakeResult ssl_handshaker_next_impl(tsi_ssl_handshaker* self)
|
|
2261
2666
|
ABSL_EXCLUSIVE_LOCKS_REQUIRED(&tsi_ssl_handshaker::mu) {
|
|
2262
2667
|
// If there are received bytes, process them first.
|
|
2263
|
-
|
|
2668
|
+
SslHandshakeResult handshake_result = {TSI_OK, SSL_ERROR_NONE, 0};
|
|
2264
2669
|
size_t bytes_written = 0;
|
|
2265
2670
|
if (!self->handshaker_next_args->received_bytes.empty()) {
|
|
2266
2671
|
size_t received_bytes_size =
|
|
@@ -2271,23 +2676,25 @@ static tsi_result ssl_handshaker_next_impl(tsi_ssl_handshaker* self)
|
|
|
2271
2676
|
size_t remaining_bytes_to_write_to_openssl_size = received_bytes_size;
|
|
2272
2677
|
size_t number_bio_write_attempts = 0;
|
|
2273
2678
|
while (remaining_bytes_to_write_to_openssl_size > 0 &&
|
|
2274
|
-
(
|
|
2679
|
+
(handshake_result.tsi_handshake_result == TSI_OK ||
|
|
2680
|
+
handshake_result.tsi_handshake_result == TSI_INCOMPLETE_DATA) &&
|
|
2275
2681
|
number_bio_write_attempts < TSI_SSL_MAX_BIO_WRITE_ATTEMPTS) {
|
|
2276
2682
|
++number_bio_write_attempts;
|
|
2277
2683
|
// Try to write all of the remaining bytes to the BIO.
|
|
2278
2684
|
size_t bytes_written_to_openssl =
|
|
2279
2685
|
remaining_bytes_to_write_to_openssl_size;
|
|
2280
|
-
|
|
2686
|
+
handshake_result = ssl_handshaker_process_bytes_from_peer(
|
|
2281
2687
|
self, remaining_bytes_to_write_to_openssl, &bytes_written_to_openssl);
|
|
2282
2688
|
// As long as the BIO is full, drive the SSL handshake to consume bytes
|
|
2283
2689
|
// from the BIO. If the SSL handshake returns any bytes, write them to
|
|
2284
2690
|
// the peer.
|
|
2285
|
-
while (
|
|
2286
|
-
status =
|
|
2691
|
+
while (handshake_result.tsi_handshake_result == TSI_DRAIN_BUFFER) {
|
|
2692
|
+
tsi_result status =
|
|
2693
|
+
ssl_handshaker_write_output_buffer(self, &bytes_written);
|
|
2287
2694
|
if (status != TSI_OK) {
|
|
2288
|
-
return status;
|
|
2695
|
+
return {status, SSL_ERROR_NONE, 0};
|
|
2289
2696
|
}
|
|
2290
|
-
|
|
2697
|
+
handshake_result = ssl_handshaker_do_handshake(self);
|
|
2291
2698
|
}
|
|
2292
2699
|
// Move the pointer to the first byte not yet successfully written to
|
|
2293
2700
|
// the BIO.
|
|
@@ -2306,21 +2713,22 @@ static tsi_result ssl_handshaker_next_impl(tsi_ssl_handshaker* self)
|
|
|
2306
2713
|
self->handshaker_next_args->received_bytes.clear();
|
|
2307
2714
|
}
|
|
2308
2715
|
#if defined(OPENSSL_IS_BORINGSSL)
|
|
2309
|
-
} else if (self->key_signer != nullptr
|
|
2310
|
-
|
|
2311
|
-
//
|
|
2312
|
-
//
|
|
2313
|
-
|
|
2716
|
+
} else if (self->key_signer != nullptr ||
|
|
2717
|
+
GetCertificateSelector(self) != nullptr) {
|
|
2718
|
+
// After an asynchronous certificate selection offload or private key
|
|
2719
|
+
// offload, another call to ssl_handshaker_do_handshake needs to be
|
|
2720
|
+
// triggered to continue the SSL handshake.
|
|
2721
|
+
handshake_result = ssl_handshaker_do_handshake(self);
|
|
2314
2722
|
#endif
|
|
2315
2723
|
}
|
|
2316
2724
|
|
|
2317
|
-
if (
|
|
2318
|
-
return
|
|
2725
|
+
if (handshake_result.tsi_handshake_result != TSI_OK) {
|
|
2726
|
+
return handshake_result;
|
|
2319
2727
|
}
|
|
2320
2728
|
// Get bytes to send to the peer, if available.
|
|
2321
|
-
status = ssl_handshaker_write_output_buffer(self, &bytes_written);
|
|
2729
|
+
tsi_result status = ssl_handshaker_write_output_buffer(self, &bytes_written);
|
|
2322
2730
|
if (status != TSI_OK) {
|
|
2323
|
-
return status;
|
|
2731
|
+
return {status, SSL_ERROR_NONE, 0};
|
|
2324
2732
|
}
|
|
2325
2733
|
self->handshaker_next_args->bytes_to_send = self->outgoing_bytes_buffer;
|
|
2326
2734
|
self->handshaker_next_args->bytes_to_send_size = bytes_written;
|
|
@@ -2336,14 +2744,14 @@ static tsi_result ssl_handshaker_next_impl(tsi_ssl_handshaker* self)
|
|
|
2336
2744
|
size_t unused_bytes_size = 0;
|
|
2337
2745
|
status = ssl_bytes_remaining(self, &unused_bytes, &unused_bytes_size);
|
|
2338
2746
|
if (status != TSI_OK) {
|
|
2339
|
-
return status;
|
|
2747
|
+
return {status, SSL_ERROR_NONE, 0};
|
|
2340
2748
|
}
|
|
2341
2749
|
if (unused_bytes_size >
|
|
2342
2750
|
self->handshaker_next_args->original_received_bytes_size) {
|
|
2343
2751
|
LOG(ERROR) << "More unused bytes than received bytes.";
|
|
2344
2752
|
gpr_free(unused_bytes);
|
|
2345
2753
|
self->MaybeSetError("More unused bytes than received bytes.");
|
|
2346
|
-
return TSI_INTERNAL_ERROR;
|
|
2754
|
+
return {TSI_INTERNAL_ERROR, SSL_ERROR_NONE, 0};
|
|
2347
2755
|
}
|
|
2348
2756
|
status =
|
|
2349
2757
|
ssl_handshaker_result_create(self, unused_bytes, unused_bytes_size);
|
|
@@ -2364,8 +2772,9 @@ static tsi_result ssl_handshaker_next_impl(tsi_ssl_handshaker* self)
|
|
|
2364
2772
|
}
|
|
2365
2773
|
}
|
|
2366
2774
|
}
|
|
2775
|
+
return {status, SSL_ERROR_NONE, 0};
|
|
2367
2776
|
}
|
|
2368
|
-
return status;
|
|
2777
|
+
return {status, SSL_ERROR_NONE, 0};
|
|
2369
2778
|
}
|
|
2370
2779
|
|
|
2371
2780
|
// Wrapper for ssl_handshaker_next_impl() when called from an async callback.
|
|
@@ -2376,13 +2785,14 @@ ssl_handshaker_next_async(tsi_ssl_handshaker* self)
|
|
|
2376
2785
|
if (self->is_shutdown || !self->handshaker_next_args.has_value()) {
|
|
2377
2786
|
return {TSI_HANDSHAKE_SHUTDOWN, std::nullopt};
|
|
2378
2787
|
}
|
|
2379
|
-
|
|
2380
|
-
if (
|
|
2788
|
+
SslHandshakeResult handshake_result = ssl_handshaker_next_impl(self);
|
|
2789
|
+
if (handshake_result.tsi_handshake_result != TSI_ASYNC) {
|
|
2790
|
+
self->MaybeRecordTelemetry(handshake_result);
|
|
2381
2791
|
// We now have a result to return to the caller via the callback.
|
|
2382
2792
|
std::optional<HandshakerNextArgs> args =
|
|
2383
2793
|
std::move(self->handshaker_next_args);
|
|
2384
2794
|
self->handshaker_next_args.reset();
|
|
2385
|
-
return {
|
|
2795
|
+
return {handshake_result.tsi_handshake_result, std::move(args)};
|
|
2386
2796
|
}
|
|
2387
2797
|
return {TSI_ASYNC, std::nullopt};
|
|
2388
2798
|
}
|
|
@@ -2401,7 +2811,7 @@ static tsi_result ssl_handshaker_next(
|
|
|
2401
2811
|
return TSI_INVALID_ARGUMENT;
|
|
2402
2812
|
}
|
|
2403
2813
|
tsi_ssl_handshaker* impl = static_cast<tsi_ssl_handshaker*>(self);
|
|
2404
|
-
grpc_core::MutexLock lock(
|
|
2814
|
+
grpc_core::MutexLock lock(impl->mu);
|
|
2405
2815
|
if (impl->is_shutdown) {
|
|
2406
2816
|
if (error != nullptr) *error = "Handshaker shutdown";
|
|
2407
2817
|
return TSI_HANDSHAKE_SHUTDOWN;
|
|
@@ -2418,37 +2828,64 @@ static tsi_result ssl_handshaker_next(
|
|
|
2418
2828
|
impl->handshaker_next_args->user_data = user_data;
|
|
2419
2829
|
impl->handshaker_next_args->error_ptr = error;
|
|
2420
2830
|
// Now do the actual work.
|
|
2421
|
-
|
|
2831
|
+
SslHandshakeResult handshake_result = ssl_handshaker_next_impl(impl);
|
|
2422
2832
|
// If returning synchronously, propagate output and clear args.
|
|
2423
|
-
if (
|
|
2833
|
+
if (handshake_result.tsi_handshake_result != TSI_ASYNC) {
|
|
2424
2834
|
*bytes_to_send = impl->handshaker_next_args->bytes_to_send;
|
|
2425
2835
|
*bytes_to_send_size = impl->handshaker_next_args->bytes_to_send_size;
|
|
2426
2836
|
*handshaker_result = impl->handshaker_next_args->handshaker_result;
|
|
2837
|
+
impl->MaybeRecordTelemetry(handshake_result);
|
|
2427
2838
|
impl->handshaker_next_args.reset();
|
|
2428
2839
|
}
|
|
2429
|
-
return
|
|
2840
|
+
return handshake_result.tsi_handshake_result;
|
|
2430
2841
|
}
|
|
2431
2842
|
|
|
2432
|
-
static void ssl_handshaker_shutdown(tsi_handshaker* self) {
|
|
2433
|
-
#if defined(OPENSSL_IS_BORINGSSL)
|
|
2843
|
+
static void ssl_handshaker_shutdown(tsi_handshaker* self, bool peer_closed) {
|
|
2434
2844
|
tsi_ssl_handshaker* impl = static_cast<tsi_ssl_handshaker*>(self);
|
|
2845
|
+
#if defined(OPENSSL_IS_BORINGSSL)
|
|
2846
|
+
std::shared_ptr<grpc_core::PrivateKeySigner> key_signer;
|
|
2435
2847
|
std::shared_ptr<grpc_core::PrivateKeySigner::AsyncSigningHandle>
|
|
2436
2848
|
signing_handle;
|
|
2849
|
+
std::shared_ptr<AsyncCertificateSelectionHandle> cert_selection_handle;
|
|
2437
2850
|
std::optional<HandshakerNextArgs> next_args;
|
|
2851
|
+
#endif // defined(OPENSSL_IS_BORINGSSL)
|
|
2438
2852
|
{
|
|
2439
|
-
grpc_core::MutexLock lock(
|
|
2853
|
+
grpc_core::MutexLock lock(impl->mu);
|
|
2854
|
+
// Should never happen, if so something is very wrong
|
|
2440
2855
|
if (impl->ssl == nullptr) return;
|
|
2441
2856
|
impl->is_shutdown = true;
|
|
2857
|
+
impl->MaybeRecordTelemetry({
|
|
2858
|
+
/*tsi_result=*/peer_closed ? TSI_CLOSE_NOTIFY : TSI_HANDSHAKE_SHUTDOWN,
|
|
2859
|
+
/*ssl_error=*/SSL_ERROR_NONE,
|
|
2860
|
+
/*err_code=*/0,
|
|
2861
|
+
});
|
|
2862
|
+
#if defined(OPENSSL_IS_BORINGSSL)
|
|
2442
2863
|
if (impl->key_signer != nullptr && impl->signing_handle != nullptr) {
|
|
2864
|
+
key_signer = std::move(impl->key_signer);
|
|
2443
2865
|
signing_handle = std::move(impl->signing_handle);
|
|
2444
2866
|
}
|
|
2867
|
+
if (GetCertificateSelector(impl) != nullptr &&
|
|
2868
|
+
impl->cert_selection_handle != nullptr) {
|
|
2869
|
+
cert_selection_handle = std::move(impl->cert_selection_handle);
|
|
2870
|
+
}
|
|
2445
2871
|
if (impl->handshaker_next_args.has_value()) {
|
|
2446
2872
|
next_args = std::move(*impl->handshaker_next_args);
|
|
2447
2873
|
impl->handshaker_next_args.reset();
|
|
2448
2874
|
}
|
|
2449
2875
|
}
|
|
2450
|
-
|
|
2451
|
-
|
|
2876
|
+
// We must not invoke these Cancel functions while holding the mutex because
|
|
2877
|
+
// this could lead to a deadlock due to mutexes being acquired in reverse
|
|
2878
|
+
// order in different threads. In one thread, the key signer or cert selector
|
|
2879
|
+
// plugin may be holding its own mutex while it invokes the on_complete
|
|
2880
|
+
// callback, which will then acquire the mutex here. So we can't also be
|
|
2881
|
+
// holding the mutex here while calling the plugin's Cancel method, which may
|
|
2882
|
+
// need to acquire its own mutex.
|
|
2883
|
+
if (key_signer != nullptr) {
|
|
2884
|
+
key_signer->Cancel(signing_handle);
|
|
2885
|
+
}
|
|
2886
|
+
if (cert_selection_handle != nullptr) {
|
|
2887
|
+
reinterpret_cast<tsi_ssl_server_handshaker_factory*>(impl->factory_ref)
|
|
2888
|
+
->certificate_selector->Cancel(cert_selection_handle);
|
|
2452
2889
|
}
|
|
2453
2890
|
if (next_args.has_value()) {
|
|
2454
2891
|
grpc_event_engine::experimental::GetDefaultEventEngine()->Run(
|
|
@@ -2461,8 +2898,8 @@ static void ssl_handshaker_shutdown(tsi_handshaker* self) {
|
|
|
2461
2898
|
args.handshaker_result);
|
|
2462
2899
|
}
|
|
2463
2900
|
});
|
|
2464
|
-
}
|
|
2465
2901
|
#endif // defined(OPENSSL_IS_BORINGSSL)
|
|
2902
|
+
}
|
|
2466
2903
|
}
|
|
2467
2904
|
|
|
2468
2905
|
static const tsi_handshaker_vtable handshaker_vtable = {
|
|
@@ -2492,15 +2929,17 @@ static void tsi_ssl_handshaker_resume_session(
|
|
|
2492
2929
|
}
|
|
2493
2930
|
|
|
2494
2931
|
static tsi_result create_tsi_ssl_handshaker(
|
|
2495
|
-
SSL_CTX* ctx,
|
|
2932
|
+
SSL_CTX* ctx, bool is_client, const char* server_name_indication,
|
|
2496
2933
|
size_t network_bio_buf_size, size_t ssl_bio_buf_size,
|
|
2497
2934
|
std::optional<std::string> alpn_preferred_protocol_raw_list,
|
|
2498
2935
|
std::shared_ptr<grpc_core::PrivateKeySigner> key_signer,
|
|
2499
|
-
tsi_ssl_handshaker_factory* factory,
|
|
2936
|
+
tsi_ssl_handshaker_factory* factory,
|
|
2937
|
+
grpc_core::RefCountedPtr<grpc_core::CollectionScope> collection_scope,
|
|
2938
|
+
std::string target, std::string locality, std::string backend_service,
|
|
2939
|
+
tsi_handshaker** handshaker) {
|
|
2500
2940
|
SSL* ssl = SSL_new(ctx);
|
|
2501
2941
|
BIO* network_io = nullptr;
|
|
2502
2942
|
BIO* ssl_io = nullptr;
|
|
2503
|
-
tsi_ssl_handshaker* impl = nullptr;
|
|
2504
2943
|
*handshaker = nullptr;
|
|
2505
2944
|
if (ctx == nullptr) {
|
|
2506
2945
|
LOG(ERROR) << "SSL Context is null. Should never happen.";
|
|
@@ -2590,20 +3029,11 @@ static tsi_result create_tsi_ssl_handshaker(
|
|
|
2590
3029
|
SSL_set_accept_state(ssl);
|
|
2591
3030
|
}
|
|
2592
3031
|
|
|
2593
|
-
impl = new tsi_ssl_handshaker(
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
TSI_SSL_HANDSHAKER_OUTGOING_BUFFER_INITIAL_SIZE;
|
|
2599
|
-
impl->outgoing_bytes_buffer =
|
|
2600
|
-
static_cast<unsigned char*>(gpr_zalloc(impl->outgoing_bytes_buffer_size));
|
|
2601
|
-
impl->vtable = &handshaker_vtable;
|
|
2602
|
-
impl->factory_ref = tsi_ssl_handshaker_factory_ref(factory);
|
|
2603
|
-
#if defined(OPENSSL_IS_BORINGSSL)
|
|
2604
|
-
impl->key_signer = std::move(key_signer);
|
|
2605
|
-
#endif
|
|
2606
|
-
|
|
3032
|
+
tsi_ssl_handshaker* impl = new tsi_ssl_handshaker(
|
|
3033
|
+
&handshaker_vtable, ssl, network_io,
|
|
3034
|
+
tsi_ssl_handshaker_factory_ref(factory), std::move(collection_scope),
|
|
3035
|
+
is_client, std::move(key_signer), std::move(target), std::move(locality),
|
|
3036
|
+
std::move(backend_service));
|
|
2607
3037
|
*handshaker = impl;
|
|
2608
3038
|
|
|
2609
3039
|
if (!SSL_set_ex_data(ssl, g_ssl_ex_handshaker_index, impl)) {
|
|
@@ -2648,20 +3078,21 @@ tsi_result tsi_ssl_client_handshaker_factory_create_handshaker(
|
|
|
2648
3078
|
const char* server_name_indication, size_t network_bio_buf_size,
|
|
2649
3079
|
size_t ssl_bio_buf_size,
|
|
2650
3080
|
std::optional<std::string> alpn_preferred_protocol_list,
|
|
3081
|
+
grpc_core::RefCountedPtr<grpc_core::CollectionScope> collection_scope,
|
|
3082
|
+
std::string target, std::string locality, std::string backend_service,
|
|
2651
3083
|
tsi_handshaker** handshaker) {
|
|
2652
3084
|
GRPC_TRACE_LOG(tsi, INFO)
|
|
2653
3085
|
<< "Creating SSL handshaker with SNI " << server_name_indication;
|
|
3086
|
+
std::shared_ptr<grpc_core::PrivateKeySigner> key_signer;
|
|
2654
3087
|
#if defined(OPENSSL_IS_BORINGSSL)
|
|
2655
|
-
|
|
2656
|
-
factory->ssl_context, 1, server_name_indication, network_bio_buf_size,
|
|
2657
|
-
ssl_bio_buf_size, alpn_preferred_protocol_list, factory->key_signer,
|
|
2658
|
-
&factory->base, handshaker);
|
|
2659
|
-
#else
|
|
2660
|
-
return create_tsi_ssl_handshaker(
|
|
2661
|
-
factory->ssl_context, 1, server_name_indication, network_bio_buf_size,
|
|
2662
|
-
ssl_bio_buf_size, alpn_preferred_protocol_list, /*key_signer=*/nullptr,
|
|
2663
|
-
&factory->base, handshaker);
|
|
3088
|
+
key_signer = factory->key_signer;
|
|
2664
3089
|
#endif
|
|
3090
|
+
return create_tsi_ssl_handshaker(
|
|
3091
|
+
factory->ssl_context, /*is_client=*/true, server_name_indication,
|
|
3092
|
+
network_bio_buf_size, ssl_bio_buf_size, alpn_preferred_protocol_list,
|
|
3093
|
+
std::move(key_signer), &factory->base, std::move(collection_scope),
|
|
3094
|
+
std::move(target), std::move(locality), std::move(backend_service),
|
|
3095
|
+
handshaker);
|
|
2665
3096
|
}
|
|
2666
3097
|
|
|
2667
3098
|
void tsi_ssl_client_handshaker_factory_unref(
|
|
@@ -2701,23 +3132,24 @@ static int client_handshaker_factory_npn_callback(
|
|
|
2701
3132
|
|
|
2702
3133
|
tsi_result tsi_ssl_server_handshaker_factory_create_handshaker(
|
|
2703
3134
|
tsi_ssl_server_handshaker_factory* factory, size_t network_bio_buf_size,
|
|
2704
|
-
size_t ssl_bio_buf_size,
|
|
3135
|
+
size_t ssl_bio_buf_size,
|
|
3136
|
+
grpc_core::RefCountedPtr<grpc_core::CollectionScope> collection_scope,
|
|
3137
|
+
tsi_handshaker** handshaker) {
|
|
2705
3138
|
if (factory->ssl_contexts.empty()) return TSI_INVALID_ARGUMENT;
|
|
2706
|
-
#if defined(OPENSSL_IS_BORINGSSL)
|
|
2707
3139
|
// Create the handshaker with the first context. We will switch if needed
|
|
2708
3140
|
// because of SNI in ssl_server_handshaker_factory_servername_callback.
|
|
2709
3141
|
// Likewise, we pass the private key signer corresponding to the first
|
|
2710
3142
|
// context.
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
&factory->base, handshaker);
|
|
2715
|
-
#else
|
|
2716
|
-
return create_tsi_ssl_handshaker(factory->ssl_contexts[0].ssl_ctx, 0, nullptr,
|
|
2717
|
-
network_bio_buf_size, ssl_bio_buf_size,
|
|
2718
|
-
std::nullopt, /*key_signer=*/nullptr,
|
|
2719
|
-
&factory->base, handshaker);
|
|
3143
|
+
std::shared_ptr<grpc_core::PrivateKeySigner> key_signer;
|
|
3144
|
+
#if defined(OPENSSL_IS_BORINGSSL)
|
|
3145
|
+
key_signer = factory->ssl_contexts[0].key_signer;
|
|
2720
3146
|
#endif
|
|
3147
|
+
return create_tsi_ssl_handshaker(
|
|
3148
|
+
factory->ssl_contexts[0].ssl_ctx, /*is_client=*/false,
|
|
3149
|
+
/*server_name_indication=*/nullptr, network_bio_buf_size,
|
|
3150
|
+
ssl_bio_buf_size, std::nullopt, std::move(key_signer), &factory->base,
|
|
3151
|
+
std::move(collection_scope), /*target=*/"",
|
|
3152
|
+
/*locality=*/"", /*backend_service=*/"", handshaker);
|
|
2721
3153
|
}
|
|
2722
3154
|
|
|
2723
3155
|
void tsi_ssl_server_handshaker_factory_unref(
|
|
@@ -2777,13 +3209,20 @@ static int does_entry_match_name(absl::string_view entry,
|
|
|
2777
3209
|
|
|
2778
3210
|
static int ssl_server_handshaker_factory_servername_callback(SSL* ssl,
|
|
2779
3211
|
int* /*ap*/,
|
|
2780
|
-
void* arg)
|
|
3212
|
+
void* arg)
|
|
3213
|
+
ABSL_EXCLUSIVE_LOCKS_REQUIRED(&tsi_ssl_handshaker::mu) {
|
|
2781
3214
|
tsi_ssl_server_handshaker_factory* impl =
|
|
2782
3215
|
static_cast<tsi_ssl_server_handshaker_factory*>(arg);
|
|
2783
3216
|
const char* servername = SSL_get_servername(ssl, TLSEXT_NAMETYPE_host_name);
|
|
2784
3217
|
if (servername == nullptr || strlen(servername) == 0) {
|
|
2785
3218
|
return SSL_TLSEXT_ERR_NOACK;
|
|
2786
3219
|
}
|
|
3220
|
+
#if defined(OPENSSL_IS_BORINGSSL)
|
|
3221
|
+
// The cert selector will handle SNI.
|
|
3222
|
+
if (impl->certificate_selector != nullptr) {
|
|
3223
|
+
return SSL_TLSEXT_ERR_OK;
|
|
3224
|
+
}
|
|
3225
|
+
#endif
|
|
2787
3226
|
|
|
2788
3227
|
for (const auto& ssl_context : impl->ssl_contexts) {
|
|
2789
3228
|
if (tsi_ssl_peer_matches_name(&ssl_context.x509_subject_name, servername)) {
|
|
@@ -2852,7 +3291,7 @@ static tsi_ssl_handshaker_factory_vtable client_handshaker_factory_vtable = {
|
|
|
2852
3291
|
tsi_ssl_client_handshaker_factory_destroy};
|
|
2853
3292
|
|
|
2854
3293
|
tsi_result tsi_create_ssl_client_handshaker_factory(
|
|
2855
|
-
const
|
|
3294
|
+
const grpc_core::PemKeyCertPair* pem_key_cert_pair,
|
|
2856
3295
|
const char* pem_root_certs, const char* cipher_suites,
|
|
2857
3296
|
const char** alpn_protocols, uint16_t num_alpn_protocols,
|
|
2858
3297
|
tsi_ssl_client_handshaker_factory** factory) {
|
|
@@ -2945,7 +3384,7 @@ tsi_result tsi_create_ssl_client_handshaker_factory_with_options(
|
|
|
2945
3384
|
#if defined(OPENSSL_IS_BORINGSSL)
|
|
2946
3385
|
if (options->pem_key_cert_pair != nullptr) {
|
|
2947
3386
|
grpc_core::Match(
|
|
2948
|
-
options->pem_key_cert_pair->private_key, [](const std::string&) {},
|
|
3387
|
+
options->pem_key_cert_pair->private_key(), [](const std::string&) {},
|
|
2949
3388
|
[&](const std::shared_ptr<grpc_core::PrivateKeySigner>& key_signer) {
|
|
2950
3389
|
// The Handshaker Factory will own a shared copy of the reference
|
|
2951
3390
|
// passed through the options.
|
|
@@ -2961,9 +3400,9 @@ tsi_result tsi_create_ssl_client_handshaker_factory_with_options(
|
|
|
2961
3400
|
SSL_CTX_set_cert_store(ssl_context, options->root_store->store);
|
|
2962
3401
|
}
|
|
2963
3402
|
#endif
|
|
2964
|
-
if (
|
|
2965
|
-
(
|
|
2966
|
-
options->
|
|
3403
|
+
if (options->root_cert_info != nullptr &&
|
|
3404
|
+
(OPENSSL_VERSION_NUMBER < 0x10100000 ||
|
|
3405
|
+
options->root_store == nullptr)) {
|
|
2967
3406
|
Match(
|
|
2968
3407
|
*options->root_cert_info,
|
|
2969
3408
|
[&](const std::string& pem_root_certs) {
|
|
@@ -3056,25 +3495,25 @@ static tsi_ssl_handshaker_factory_vtable server_handshaker_factory_vtable = {
|
|
|
3056
3495
|
tsi_ssl_server_handshaker_factory_destroy};
|
|
3057
3496
|
|
|
3058
3497
|
tsi_result tsi_create_ssl_server_handshaker_factory(
|
|
3059
|
-
|
|
3498
|
+
grpc_core::KeyCertPairsOrSelector key_cert_pairs_or_selector,
|
|
3060
3499
|
const char* pem_client_root_certs, int force_client_auth,
|
|
3061
3500
|
const char* cipher_suites, const char** alpn_protocols,
|
|
3062
3501
|
uint16_t num_alpn_protocols, tsi_ssl_server_handshaker_factory** factory) {
|
|
3063
3502
|
return tsi_create_ssl_server_handshaker_factory_ex(
|
|
3064
|
-
|
|
3503
|
+
std::move(key_cert_pairs_or_selector), pem_client_root_certs,
|
|
3065
3504
|
force_client_auth ? TSI_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_AND_VERIFY
|
|
3066
3505
|
: TSI_DONT_REQUEST_CLIENT_CERTIFICATE,
|
|
3067
3506
|
cipher_suites, alpn_protocols, num_alpn_protocols, factory);
|
|
3068
3507
|
}
|
|
3069
3508
|
|
|
3070
3509
|
tsi_result tsi_create_ssl_server_handshaker_factory_ex(
|
|
3071
|
-
|
|
3510
|
+
grpc_core::KeyCertPairsOrSelector key_cert_pairs_or_selector,
|
|
3072
3511
|
const char* pem_client_root_certs,
|
|
3073
3512
|
tsi_client_certificate_request_type client_certificate_request,
|
|
3074
3513
|
const char* cipher_suites, const char** alpn_protocols,
|
|
3075
3514
|
uint16_t num_alpn_protocols, tsi_ssl_server_handshaker_factory** factory) {
|
|
3076
3515
|
tsi_ssl_server_handshaker_options options;
|
|
3077
|
-
options.
|
|
3516
|
+
options.key_cert_pairs_or_selector = std::move(key_cert_pairs_or_selector);
|
|
3078
3517
|
if (pem_client_root_certs != nullptr) {
|
|
3079
3518
|
options.root_cert_info =
|
|
3080
3519
|
std::make_shared<tsi::RootCertInfo>(pem_client_root_certs);
|
|
@@ -3087,219 +3526,249 @@ tsi_result tsi_create_ssl_server_handshaker_factory_ex(
|
|
|
3087
3526
|
factory);
|
|
3088
3527
|
}
|
|
3089
3528
|
|
|
3090
|
-
tsi_result
|
|
3529
|
+
tsi_result tsi_configure_server_ssl_context(
|
|
3091
3530
|
const tsi_ssl_server_handshaker_options* options,
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3531
|
+
const grpc_core::PemKeyCertPair* pem_key_cert_pair,
|
|
3532
|
+
tsi_ssl_server_handshaker_factory* impl, SslContext& ssl_context) {
|
|
3533
|
+
#if OPENSSL_VERSION_NUMBER >= 0x10100000
|
|
3534
|
+
ssl_context.ssl_ctx = SSL_CTX_new(TLS_method());
|
|
3535
|
+
#else
|
|
3536
|
+
ssl_context.ssl_ctx = SSL_CTX_new(TLSv1_2_method());
|
|
3537
|
+
#endif
|
|
3538
|
+
#if OPENSSL_VERSION_NUMBER >= 0x10101000 && !defined(LIBRESSL_VERSION_NUMBER)
|
|
3539
|
+
SSL_CTX_set_options(ssl_context.ssl_ctx, SSL_OP_NO_RENEGOTIATION);
|
|
3540
|
+
#endif
|
|
3541
|
+
if (ssl_context.ssl_ctx == nullptr) {
|
|
3542
|
+
tsi::LogSslErrorStack();
|
|
3543
|
+
LOG(ERROR) << "Could not create ssl context.";
|
|
3544
|
+
return TSI_OUT_OF_RESOURCES;
|
|
3545
|
+
}
|
|
3096
3546
|
|
|
3097
|
-
|
|
3547
|
+
tsi_result result = tsi_set_min_and_max_tls_versions(
|
|
3548
|
+
ssl_context.ssl_ctx, options->min_tls_version, options->max_tls_version);
|
|
3549
|
+
if (result != TSI_OK) return result;
|
|
3098
3550
|
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3551
|
+
result = populate_ssl_context(ssl_context.ssl_ctx, pem_key_cert_pair,
|
|
3552
|
+
options->cipher_suites,
|
|
3553
|
+
options->key_exchange_groups);
|
|
3554
|
+
#if defined(OPENSSL_IS_BORINGSSL)
|
|
3555
|
+
if (pem_key_cert_pair != nullptr) {
|
|
3556
|
+
grpc_core::Match(
|
|
3557
|
+
pem_key_cert_pair->private_key(), [](const std::string&) {},
|
|
3558
|
+
[&](const std::shared_ptr<grpc_core::PrivateKeySigner>& key_signer) {
|
|
3559
|
+
ssl_context.key_signer = key_signer;
|
|
3560
|
+
});
|
|
3103
3561
|
}
|
|
3562
|
+
#endif
|
|
3563
|
+
if (result != TSI_OK) return result;
|
|
3104
3564
|
|
|
3105
|
-
|
|
3106
|
-
tsi_ssl_handshaker_factory_init(&impl->base);
|
|
3107
|
-
impl->base.vtable = &server_handshaker_factory_vtable;
|
|
3565
|
+
// TODO(elessar): Provide ability to disable session ticket keys.
|
|
3108
3566
|
|
|
3109
|
-
|
|
3110
|
-
|
|
3567
|
+
// Allow client cache sessions (it's needed for OpenSSL only).
|
|
3568
|
+
int set_sid_ctx_result =
|
|
3569
|
+
SSL_CTX_set_session_id_context(ssl_context.ssl_ctx, kSslSessionIdContext,
|
|
3570
|
+
GPR_ARRAY_SIZE(kSslSessionIdContext));
|
|
3571
|
+
if (set_sid_ctx_result == 0) {
|
|
3572
|
+
LOG(ERROR) << "Failed to set session id context.";
|
|
3573
|
+
return TSI_INTERNAL_ERROR;
|
|
3111
3574
|
}
|
|
3112
3575
|
|
|
3113
|
-
if (options->
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3576
|
+
if (options->session_ticket_key != nullptr) {
|
|
3577
|
+
if (SSL_CTX_set_tlsext_ticket_keys(
|
|
3578
|
+
ssl_context.ssl_ctx, const_cast<char*>(options->session_ticket_key),
|
|
3579
|
+
options->session_ticket_key_size) == 0) {
|
|
3580
|
+
LOG(ERROR) << "Invalid STEK size.";
|
|
3581
|
+
return TSI_INVALID_ARGUMENT;
|
|
3582
|
+
}
|
|
3583
|
+
}
|
|
3584
|
+
if (options->root_cert_info != nullptr) {
|
|
3585
|
+
grpc_core::Match(
|
|
3586
|
+
*options->root_cert_info,
|
|
3587
|
+
[&](const std::string& pem_root_certs) {
|
|
3588
|
+
STACK_OF(X509_NAME)* root_names = nullptr;
|
|
3589
|
+
result = ssl_ctx_load_verification_certs(
|
|
3590
|
+
ssl_context.ssl_ctx, pem_root_certs.c_str(),
|
|
3591
|
+
pem_root_certs.size(), nullptr);
|
|
3592
|
+
if (result != TSI_OK) {
|
|
3593
|
+
LOG(ERROR) << "Invalid verification certs.";
|
|
3594
|
+
}
|
|
3595
|
+
if (options->send_client_ca_list) {
|
|
3596
|
+
SSL_CTX_set_client_CA_list(ssl_context.ssl_ctx, root_names);
|
|
3597
|
+
}
|
|
3598
|
+
},
|
|
3599
|
+
[&](const grpc_core::SpiffeBundleMap& spiffe_bundle_map) {
|
|
3600
|
+
X509_STORE* cert_store = SSL_CTX_get_cert_store(ssl_context.ssl_ctx);
|
|
3601
|
+
X509_STORE_set_flags(cert_store, X509_V_FLAG_PARTIAL_CHAIN |
|
|
3602
|
+
X509_V_FLAG_TRUSTED_FIRST);
|
|
3603
|
+
const void* p = &spiffe_bundle_map;
|
|
3604
|
+
void* map = const_cast<void*>(p);
|
|
3605
|
+
SSL_CTX_set_ex_data(ssl_context.ssl_ctx,
|
|
3606
|
+
g_ssl_ctx_ex_spiffe_bundle_map_index, map);
|
|
3607
|
+
});
|
|
3117
3608
|
if (result != TSI_OK) {
|
|
3118
|
-
tsi_ssl_handshaker_factory_unref(&impl->base);
|
|
3119
3609
|
return result;
|
|
3120
3610
|
}
|
|
3121
3611
|
}
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3612
|
+
switch (options->client_certificate_request) {
|
|
3613
|
+
case TSI_DONT_REQUEST_CLIENT_CERTIFICATE:
|
|
3614
|
+
SSL_CTX_set_verify(ssl_context.ssl_ctx, SSL_VERIFY_NONE, nullptr);
|
|
3615
|
+
break;
|
|
3616
|
+
case TSI_REQUEST_CLIENT_CERTIFICATE_BUT_DONT_VERIFY:
|
|
3617
|
+
SSL_CTX_set_verify(ssl_context.ssl_ctx, SSL_VERIFY_PEER, nullptr);
|
|
3618
|
+
SSL_CTX_set_cert_verify_callback(ssl_context.ssl_ctx, NullVerifyCallback,
|
|
3619
|
+
nullptr);
|
|
3620
|
+
break;
|
|
3621
|
+
case TSI_REQUEST_CLIENT_CERTIFICATE_AND_VERIFY:
|
|
3622
|
+
SSL_CTX_set_verify(ssl_context.ssl_ctx, SSL_VERIFY_PEER, nullptr);
|
|
3623
|
+
SSL_CTX_set_cert_verify_callback(ssl_context.ssl_ctx,
|
|
3624
|
+
CustomVerificationFunction, nullptr);
|
|
3625
|
+
break;
|
|
3626
|
+
case TSI_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_BUT_DONT_VERIFY:
|
|
3627
|
+
SSL_CTX_set_verify(ssl_context.ssl_ctx,
|
|
3628
|
+
SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT,
|
|
3629
|
+
nullptr);
|
|
3630
|
+
SSL_CTX_set_cert_verify_callback(ssl_context.ssl_ctx, NullVerifyCallback,
|
|
3631
|
+
nullptr);
|
|
3632
|
+
break;
|
|
3633
|
+
case TSI_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_AND_VERIFY:
|
|
3634
|
+
SSL_CTX_set_verify(ssl_context.ssl_ctx,
|
|
3635
|
+
SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT,
|
|
3636
|
+
nullptr);
|
|
3637
|
+
SSL_CTX_set_cert_verify_callback(ssl_context.ssl_ctx,
|
|
3638
|
+
CustomVerificationFunction, nullptr);
|
|
3639
|
+
break;
|
|
3125
3640
|
}
|
|
3126
3641
|
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3642
|
+
#if OPENSSL_VERSION_NUMBER >= 0x10100000 && !defined(LIBRESSL_VERSION_NUMBER)
|
|
3643
|
+
if (options->crl_provider != nullptr) {
|
|
3644
|
+
SSL_CTX_set_ex_data(ssl_context.ssl_ctx, g_ssl_ctx_ex_crl_provider_index,
|
|
3645
|
+
options->crl_provider.get());
|
|
3646
|
+
} else if (options->crl_directory != nullptr &&
|
|
3647
|
+
strcmp(options->crl_directory, "") != 0) {
|
|
3648
|
+
X509_STORE* cert_store = SSL_CTX_get_cert_store(ssl_context.ssl_ctx);
|
|
3649
|
+
X509_STORE_set_verify_cb(cert_store, verify_cb);
|
|
3650
|
+
if (!X509_STORE_load_locations(cert_store, nullptr,
|
|
3651
|
+
options->crl_directory)) {
|
|
3652
|
+
LOG(ERROR) << "Failed to load CRL File from directory.";
|
|
3653
|
+
} else {
|
|
3654
|
+
X509_VERIFY_PARAM* param = X509_STORE_get0_param(cert_store);
|
|
3655
|
+
X509_VERIFY_PARAM_set_flags(
|
|
3656
|
+
param, X509_V_FLAG_CRL_CHECK | X509_V_FLAG_CRL_CHECK_ALL);
|
|
3657
|
+
}
|
|
3658
|
+
}
|
|
3135
3659
|
#endif
|
|
3660
|
+
|
|
3661
|
+
if (pem_key_cert_pair != nullptr) {
|
|
3662
|
+
result = tsi_ssl_extract_x509_subject_names_from_pem_cert(
|
|
3663
|
+
pem_key_cert_pair->cert_chain().c_str(),
|
|
3664
|
+
&ssl_context.x509_subject_name);
|
|
3665
|
+
if (result != TSI_OK) return result;
|
|
3666
|
+
}
|
|
3667
|
+
// Always configure the callback because responding to SNI is required for
|
|
3668
|
+
// ClientHello in TLS 1.3, and we need to respond to that.
|
|
3669
|
+
SSL_CTX_set_tlsext_servername_callback(
|
|
3670
|
+
ssl_context.ssl_ctx, ssl_server_handshaker_factory_servername_callback);
|
|
3671
|
+
SSL_CTX_set_tlsext_servername_arg(ssl_context.ssl_ctx, impl);
|
|
3672
|
+
#if TSI_OPENSSL_ALPN_SUPPORT
|
|
3673
|
+
SSL_CTX_set_alpn_select_cb(ssl_context.ssl_ctx,
|
|
3674
|
+
ServerHandshakerFactoryAlpnCallback, impl);
|
|
3675
|
+
#endif // TSI_OPENSSL_ALPN_SUPPORT
|
|
3676
|
+
SSL_CTX_set_next_protos_advertised_cb(
|
|
3677
|
+
ssl_context.ssl_ctx, server_handshaker_factory_npn_advertised_callback,
|
|
3678
|
+
impl);
|
|
3679
|
+
|
|
3136
3680
|
#if OPENSSL_VERSION_NUMBER >= 0x10101000 && !defined(LIBRESSL_VERSION_NUMBER)
|
|
3137
|
-
|
|
3681
|
+
// Register factory at index
|
|
3682
|
+
if (options->key_logger != nullptr) {
|
|
3683
|
+
// Need to set factory at g_ssl_ctx_ex_factory_index
|
|
3684
|
+
SSL_CTX_set_ex_data(ssl_context.ssl_ctx, g_ssl_ctx_ex_factory_index, impl);
|
|
3685
|
+
// SSL_CTX_set_keylog_callback is set here to register callback
|
|
3686
|
+
// when ssl/tls handshakes complete.
|
|
3687
|
+
SSL_CTX_set_keylog_callback(
|
|
3688
|
+
ssl_context.ssl_ctx,
|
|
3689
|
+
ssl_keylogging_callback<tsi_ssl_server_handshaker_factory>);
|
|
3690
|
+
}
|
|
3138
3691
|
#endif
|
|
3139
|
-
if (ssl_context.ssl_ctx == nullptr) {
|
|
3140
|
-
tsi::LogSslErrorStack();
|
|
3141
|
-
LOG(ERROR) << "Could not create ssl context.";
|
|
3142
|
-
result = TSI_OUT_OF_RESOURCES;
|
|
3143
|
-
break;
|
|
3144
|
-
}
|
|
3145
3692
|
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
options->max_tls_version);
|
|
3149
|
-
if (result != TSI_OK) return result;
|
|
3693
|
+
return result;
|
|
3694
|
+
}
|
|
3150
3695
|
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3696
|
+
tsi_result tsi_create_ssl_server_handshaker_factory_with_options(
|
|
3697
|
+
const tsi_ssl_server_handshaker_options* options,
|
|
3698
|
+
tsi_ssl_server_handshaker_factory** factory) {
|
|
3699
|
+
tsi_ssl_server_handshaker_factory* impl = nullptr;
|
|
3155
3700
|
|
|
3156
|
-
|
|
3157
|
-
grpc_core::Match(
|
|
3158
|
-
options->pem_key_cert_pairs[i].private_key, [](const std::string&) {},
|
|
3159
|
-
[&](const std::shared_ptr<grpc_core::PrivateKeySigner>& key_signer) {
|
|
3160
|
-
ssl_context.key_signer = key_signer;
|
|
3161
|
-
});
|
|
3162
|
-
#endif
|
|
3701
|
+
gpr_once_init(&g_init_openssl_once, init_openssl);
|
|
3163
3702
|
|
|
3164
|
-
|
|
3703
|
+
if (factory == nullptr) return TSI_INVALID_ARGUMENT;
|
|
3704
|
+
*factory = nullptr;
|
|
3165
3705
|
|
|
3166
|
-
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
GPR_ARRAY_SIZE(kSslSessionIdContext));
|
|
3170
|
-
if (set_sid_ctx_result == 0) {
|
|
3171
|
-
LOG(ERROR) << "Failed to set session id context.";
|
|
3172
|
-
result = TSI_INTERNAL_ERROR;
|
|
3173
|
-
break;
|
|
3174
|
-
}
|
|
3706
|
+
impl = new tsi_ssl_server_handshaker_factory();
|
|
3707
|
+
tsi_ssl_handshaker_factory_init(&impl->base);
|
|
3708
|
+
impl->base.vtable = &server_handshaker_factory_vtable;
|
|
3175
3709
|
|
|
3176
|
-
|
|
3177
|
-
|
|
3178
|
-
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
LOG(ERROR) << "Invalid STEK size.";
|
|
3182
|
-
result = TSI_INVALID_ARGUMENT;
|
|
3183
|
-
break;
|
|
3710
|
+
tsi_result result = grpc_core::Match(
|
|
3711
|
+
options->key_cert_pairs_or_selector,
|
|
3712
|
+
[&](const grpc_core::PemKeyCertPairList& pem_key_cert_pairs) {
|
|
3713
|
+
if (pem_key_cert_pairs.empty()) {
|
|
3714
|
+
return TSI_INVALID_ARGUMENT;
|
|
3184
3715
|
}
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
pem_root_certs.size(), nullptr);
|
|
3194
|
-
if (result != TSI_OK) {
|
|
3195
|
-
LOG(ERROR) << "Invalid verification certs.";
|
|
3196
|
-
}
|
|
3197
|
-
if (options->send_client_ca_list) {
|
|
3198
|
-
SSL_CTX_set_client_CA_list(ssl_context.ssl_ctx, root_names);
|
|
3199
|
-
}
|
|
3200
|
-
},
|
|
3201
|
-
[&](const grpc_core::SpiffeBundleMap& spiffe_bundle_map) {
|
|
3202
|
-
X509_STORE* cert_store =
|
|
3203
|
-
SSL_CTX_get_cert_store(ssl_context.ssl_ctx);
|
|
3204
|
-
X509_STORE_set_flags(cert_store, X509_V_FLAG_PARTIAL_CHAIN |
|
|
3205
|
-
X509_V_FLAG_TRUSTED_FIRST);
|
|
3206
|
-
const void* p = &spiffe_bundle_map;
|
|
3207
|
-
void* map = const_cast<void*>(p);
|
|
3208
|
-
SSL_CTX_set_ex_data(ssl_context.ssl_ctx,
|
|
3209
|
-
g_ssl_ctx_ex_spiffe_bundle_map_index, map);
|
|
3210
|
-
});
|
|
3211
|
-
if (result != TSI_OK) {
|
|
3212
|
-
break;
|
|
3716
|
+
impl->ssl_contexts.reserve(pem_key_cert_pairs.size());
|
|
3717
|
+
for (size_t i = 0; i < pem_key_cert_pairs.size(); ++i) {
|
|
3718
|
+
SslContext& ssl_context = impl->ssl_contexts.emplace_back();
|
|
3719
|
+
tsi_result result = tsi_configure_server_ssl_context(
|
|
3720
|
+
options, &pem_key_cert_pairs[i], impl, ssl_context);
|
|
3721
|
+
if (result != TSI_OK) {
|
|
3722
|
+
return result;
|
|
3723
|
+
}
|
|
3213
3724
|
}
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
SSL_CTX_set_cert_verify_callback(ssl_context.ssl_ctx,
|
|
3222
|
-
NullVerifyCallback, nullptr);
|
|
3223
|
-
break;
|
|
3224
|
-
case TSI_REQUEST_CLIENT_CERTIFICATE_AND_VERIFY:
|
|
3225
|
-
SSL_CTX_set_verify(ssl_context.ssl_ctx, SSL_VERIFY_PEER, nullptr);
|
|
3226
|
-
SSL_CTX_set_cert_verify_callback(ssl_context.ssl_ctx,
|
|
3227
|
-
CustomVerificationFunction, nullptr);
|
|
3228
|
-
break;
|
|
3229
|
-
case TSI_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_BUT_DONT_VERIFY:
|
|
3230
|
-
SSL_CTX_set_verify(ssl_context.ssl_ctx,
|
|
3231
|
-
SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT,
|
|
3232
|
-
nullptr);
|
|
3233
|
-
SSL_CTX_set_cert_verify_callback(ssl_context.ssl_ctx,
|
|
3234
|
-
NullVerifyCallback, nullptr);
|
|
3235
|
-
break;
|
|
3236
|
-
case TSI_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_AND_VERIFY:
|
|
3237
|
-
SSL_CTX_set_verify(ssl_context.ssl_ctx,
|
|
3238
|
-
SSL_VERIFY_PEER | SSL_VERIFY_FAIL_IF_NO_PEER_CERT,
|
|
3239
|
-
nullptr);
|
|
3240
|
-
SSL_CTX_set_cert_verify_callback(ssl_context.ssl_ctx,
|
|
3241
|
-
CustomVerificationFunction, nullptr);
|
|
3242
|
-
break;
|
|
3243
|
-
}
|
|
3244
|
-
|
|
3245
|
-
#if OPENSSL_VERSION_NUMBER >= 0x10100000 && !defined(LIBRESSL_VERSION_NUMBER)
|
|
3246
|
-
if (options->crl_provider != nullptr) {
|
|
3247
|
-
SSL_CTX_set_ex_data(ssl_context.ssl_ctx,
|
|
3248
|
-
g_ssl_ctx_ex_crl_provider_index,
|
|
3249
|
-
options->crl_provider.get());
|
|
3250
|
-
} else if (options->crl_directory != nullptr &&
|
|
3251
|
-
strcmp(options->crl_directory, "") != 0) {
|
|
3252
|
-
X509_STORE* cert_store = SSL_CTX_get_cert_store(ssl_context.ssl_ctx);
|
|
3253
|
-
X509_STORE_set_verify_cb(cert_store, verify_cb);
|
|
3254
|
-
if (!X509_STORE_load_locations(cert_store, nullptr,
|
|
3255
|
-
options->crl_directory)) {
|
|
3256
|
-
LOG(ERROR) << "Failed to load CRL File from directory.";
|
|
3257
|
-
} else {
|
|
3258
|
-
X509_VERIFY_PARAM* param = X509_STORE_get0_param(cert_store);
|
|
3259
|
-
X509_VERIFY_PARAM_set_flags(
|
|
3260
|
-
param, X509_V_FLAG_CRL_CHECK | X509_V_FLAG_CRL_CHECK_ALL);
|
|
3725
|
+
return TSI_OK;
|
|
3726
|
+
},
|
|
3727
|
+
[&](const std::shared_ptr<grpc_core::CertificateSelector>&
|
|
3728
|
+
cert_selector) {
|
|
3729
|
+
#if defined(OPENSSL_IS_BORINGSSL)
|
|
3730
|
+
if (cert_selector == nullptr) {
|
|
3731
|
+
return TSI_INVALID_ARGUMENT;
|
|
3261
3732
|
}
|
|
3262
|
-
|
|
3733
|
+
SslContext& ssl_context = impl->ssl_contexts.emplace_back();
|
|
3734
|
+
tsi_result result = tsi_configure_server_ssl_context(
|
|
3735
|
+
options, /*pem_key_cert_pair=*/nullptr, impl, ssl_context);
|
|
3736
|
+
if (result != TSI_OK) {
|
|
3737
|
+
return result;
|
|
3738
|
+
}
|
|
3739
|
+
impl->certificate_selector = cert_selector;
|
|
3740
|
+
SSL_CTX_set_select_certificate_cb(ssl_context.ssl_ctx,
|
|
3741
|
+
SelectCertificateCallback);
|
|
3742
|
+
return TSI_OK;
|
|
3743
|
+
#else
|
|
3744
|
+
VLOG(2) << "CertificateSelector is not supported with this SSL "
|
|
3745
|
+
"implementation.";
|
|
3746
|
+
return TSI_UNIMPLEMENTED;
|
|
3263
3747
|
#endif
|
|
3748
|
+
});
|
|
3749
|
+
if (result != TSI_OK) {
|
|
3750
|
+
tsi_ssl_handshaker_factory_unref(&impl->base);
|
|
3751
|
+
return result;
|
|
3752
|
+
}
|
|
3264
3753
|
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
if (result != TSI_OK) break;
|
|
3269
|
-
|
|
3270
|
-
SSL_CTX_set_tlsext_servername_callback(
|
|
3271
|
-
ssl_context.ssl_ctx,
|
|
3272
|
-
ssl_server_handshaker_factory_servername_callback);
|
|
3273
|
-
SSL_CTX_set_tlsext_servername_arg(ssl_context.ssl_ctx, impl);
|
|
3274
|
-
#if TSI_OPENSSL_ALPN_SUPPORT
|
|
3275
|
-
SSL_CTX_set_alpn_select_cb(ssl_context.ssl_ctx,
|
|
3276
|
-
ServerHandshakerFactoryAlpnCallback, impl);
|
|
3277
|
-
#endif // TSI_OPENSSL_ALPN_SUPPORT
|
|
3278
|
-
SSL_CTX_set_next_protos_advertised_cb(
|
|
3279
|
-
ssl_context.ssl_ctx,
|
|
3280
|
-
server_handshaker_factory_npn_advertised_callback, impl);
|
|
3281
|
-
|
|
3282
|
-
#if OPENSSL_VERSION_NUMBER >= 0x10101000 && !defined(LIBRESSL_VERSION_NUMBER)
|
|
3283
|
-
// Register factory at index
|
|
3284
|
-
if (options->key_logger != nullptr) {
|
|
3285
|
-
// Need to set factory at g_ssl_ctx_ex_factory_index
|
|
3286
|
-
SSL_CTX_set_ex_data(ssl_context.ssl_ctx, g_ssl_ctx_ex_factory_index,
|
|
3287
|
-
impl);
|
|
3288
|
-
// SSL_CTX_set_keylog_callback is set here to register callback
|
|
3289
|
-
// when ssl/tls handshakes complete.
|
|
3290
|
-
SSL_CTX_set_keylog_callback(
|
|
3291
|
-
ssl_context.ssl_ctx,
|
|
3292
|
-
ssl_keylogging_callback<tsi_ssl_server_handshaker_factory>);
|
|
3293
|
-
}
|
|
3294
|
-
#endif
|
|
3295
|
-
} while (false);
|
|
3754
|
+
if (options->root_cert_info != nullptr) {
|
|
3755
|
+
impl->root_cert_info = options->root_cert_info;
|
|
3756
|
+
}
|
|
3296
3757
|
|
|
3758
|
+
if (options->num_alpn_protocols > 0) {
|
|
3759
|
+
result = BuildAlpnProtocolNameList(
|
|
3760
|
+
options->alpn_protocols, options->num_alpn_protocols,
|
|
3761
|
+
&impl->alpn_protocol_list, &impl->alpn_protocol_list_length);
|
|
3297
3762
|
if (result != TSI_OK) {
|
|
3298
3763
|
tsi_ssl_handshaker_factory_unref(&impl->base);
|
|
3299
3764
|
return result;
|
|
3300
3765
|
}
|
|
3301
3766
|
}
|
|
3302
3767
|
|
|
3768
|
+
if (options->key_logger != nullptr) {
|
|
3769
|
+
impl->key_logger = options->key_logger->Ref();
|
|
3770
|
+
}
|
|
3771
|
+
|
|
3303
3772
|
*factory = impl;
|
|
3304
3773
|
return TSI_OK;
|
|
3305
3774
|
}
|