grpc 1.69.0 → 1.70.1
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 +251 -249
- data/include/grpc/support/atm.h +0 -13
- data/src/core/call/request_buffer.cc +224 -0
- data/src/core/call/request_buffer.h +192 -0
- data/src/core/client_channel/client_channel.cc +2 -3
- data/src/core/client_channel/client_channel_args.h +21 -0
- data/src/core/client_channel/client_channel_filter.h +1 -3
- data/src/core/client_channel/retry_interceptor.cc +406 -0
- data/src/core/client_channel/retry_interceptor.h +157 -0
- data/src/core/client_channel/retry_service_config.h +13 -0
- data/src/core/client_channel/retry_throttle.cc +33 -18
- data/src/core/client_channel/retry_throttle.h +3 -3
- data/src/core/ext/transport/chttp2/server/chttp2_server.cc +596 -94
- data/src/core/ext/transport/chttp2/server/chttp2_server.h +189 -13
- data/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +1 -0
- data/src/core/ext/transport/chttp2/transport/frame_security.cc +1 -3
- data/src/core/ext/transport/chttp2/transport/stream_lists.cc +40 -1
- data/src/core/ext/upb-gen/envoy/admin/v3/config_dump_shared.upb.h +3 -1
- data/src/core/ext/upb-gen/envoy/config/cluster/v3/cluster.upb.h +66 -36
- data/src/core/ext/upb-gen/envoy/config/cluster/v3/cluster.upb_minitable.c +19 -17
- data/src/core/ext/upb-gen/envoy/config/core/v3/base.upb.h +116 -0
- data/src/core/ext/upb-gen/envoy/config/core/v3/base.upb_minitable.c +31 -5
- data/src/core/ext/upb-gen/envoy/config/core/v3/base.upb_minitable.h +2 -0
- data/src/core/ext/upb-gen/envoy/config/core/v3/protocol.upb.h +67 -6
- data/src/core/ext/upb-gen/envoy/config/core/v3/protocol.upb_minitable.c +12 -8
- data/src/core/ext/upb-gen/envoy/config/core/v3/socket_cmsg_headers.upb.h +151 -0
- data/src/core/ext/upb-gen/envoy/config/core/v3/socket_cmsg_headers.upb_minitable.c +60 -0
- data/src/core/ext/upb-gen/envoy/config/core/v3/socket_cmsg_headers.upb_minitable.h +32 -0
- data/src/core/ext/upb-gen/envoy/config/core/v3/socket_option.upb.h +228 -21
- data/src/core/ext/upb-gen/envoy/config/core/v3/socket_option.upb_minitable.c +65 -17
- data/src/core/ext/upb-gen/envoy/config/core/v3/socket_option.upb_minitable.h +6 -0
- data/src/core/ext/upb-gen/envoy/config/listener/v3/listener_components.upb.h +7 -106
- data/src/core/ext/upb-gen/envoy/config/listener/v3/listener_components.upb_minitable.c +7 -28
- data/src/core/ext/upb-gen/envoy/config/listener/v3/listener_components.upb_minitable.h +0 -2
- data/src/core/ext/upb-gen/envoy/config/listener/v3/quic_config.upb.h +85 -0
- data/src/core/ext/upb-gen/envoy/config/listener/v3/quic_config.upb_minitable.c +25 -3
- data/src/core/ext/upb-gen/envoy/config/overload/v3/overload.upb.h +2 -1
- data/src/core/ext/upb-gen/envoy/config/rbac/v3/rbac.upb.h +152 -0
- data/src/core/ext/upb-gen/envoy/config/rbac/v3/rbac.upb_minitable.c +40 -10
- data/src/core/ext/upb-gen/envoy/config/rbac/v3/rbac.upb_minitable.h +2 -0
- data/src/core/ext/upb-gen/envoy/config/route/v3/route_components.upb.h +135 -4
- data/src/core/ext/upb-gen/envoy/config/route/v3/route_components.upb_minitable.c +41 -9
- data/src/core/ext/upb-gen/envoy/config/route/v3/route_components.upb_minitable.h +2 -0
- data/src/core/ext/upb-gen/envoy/config/trace/v3/trace.upb.h +0 -2
- data/src/core/ext/upb-gen/envoy/config/trace/v3/trace.upb_minitable.c +0 -1
- data/src/core/ext/upb-gen/envoy/config/trace/v3/trace.upb_minitable.h +0 -1
- data/src/core/ext/upb-gen/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb.h +16 -0
- data/src/core/ext/upb-gen/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upb_minitable.c +3 -2
- data/src/core/ext/upb-gen/envoy/extensions/load_balancing_policies/client_side_weighted_round_robin/v3/client_side_weighted_round_robin.upb.h +60 -0
- data/src/core/ext/upb-gen/envoy/extensions/load_balancing_policies/client_side_weighted_round_robin/v3/client_side_weighted_round_robin.upb_minitable.c +13 -2
- data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/http_11_proxy/v3/upstream_http_11_connect.upb.h +0 -1
- data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/http_11_proxy/v3/upstream_http_11_connect.upb_minitable.c +0 -1
- data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/tls/v3/tls.upb.h +102 -24
- data/src/core/ext/upb-gen/envoy/extensions/transport_sockets/tls/v3/tls.upb_minitable.c +28 -19
- data/src/core/ext/upb-gen/envoy/service/discovery/v3/discovery.upb.h +251 -18
- data/src/core/ext/upb-gen/envoy/service/discovery/v3/discovery.upb_minitable.c +41 -16
- data/src/core/ext/upb-gen/envoy/service/discovery/v3/discovery.upb_minitable.h +2 -0
- data/src/core/ext/upb-gen/envoy/service/status/v3/csds.upb.h +2 -1
- data/src/core/ext/upbdefs-gen/envoy/admin/v3/config_dump_shared.upbdefs.c +11 -10
- data/src/core/ext/upbdefs-gen/envoy/config/cluster/v3/cluster.upbdefs.c +418 -413
- data/src/core/ext/upbdefs-gen/envoy/config/core/v3/base.upbdefs.c +161 -153
- data/src/core/ext/upbdefs-gen/envoy/config/core/v3/base.upbdefs.h +5 -0
- data/src/core/ext/upbdefs-gen/envoy/config/core/v3/protocol.upbdefs.c +267 -261
- data/src/core/ext/upbdefs-gen/envoy/config/core/v3/socket_cmsg_headers.upbdefs.c +46 -0
- data/src/core/ext/upbdefs-gen/envoy/config/core/v3/socket_cmsg_headers.upbdefs.h +33 -0
- data/src/core/ext/upbdefs-gen/envoy/config/core/v3/socket_option.upbdefs.c +29 -19
- data/src/core/ext/upbdefs-gen/envoy/config/core/v3/socket_option.upbdefs.h +15 -0
- data/src/core/ext/upbdefs-gen/envoy/config/listener/v3/listener_components.upbdefs.c +58 -65
- data/src/core/ext/upbdefs-gen/envoy/config/listener/v3/listener_components.upbdefs.h +0 -5
- data/src/core/ext/upbdefs-gen/envoy/config/listener/v3/quic_config.upbdefs.c +73 -63
- data/src/core/ext/upbdefs-gen/envoy/config/overload/v3/overload.upbdefs.c +49 -48
- data/src/core/ext/upbdefs-gen/envoy/config/rbac/v3/rbac.upbdefs.c +117 -100
- data/src/core/ext/upbdefs-gen/envoy/config/rbac/v3/rbac.upbdefs.h +5 -0
- data/src/core/ext/upbdefs-gen/envoy/config/route/v3/route_components.upbdefs.c +905 -897
- data/src/core/ext/upbdefs-gen/envoy/config/route/v3/route_components.upbdefs.h +5 -0
- data/src/core/ext/upbdefs-gen/envoy/config/trace/v3/trace.upbdefs.c +15 -18
- data/src/core/ext/upbdefs-gen/envoy/extensions/filters/network/http_connection_manager/v3/http_connection_manager.upbdefs.c +460 -457
- data/src/core/ext/upbdefs-gen/envoy/extensions/transport_sockets/http_11_proxy/v3/upstream_http_11_connect.upbdefs.c +16 -19
- data/src/core/ext/upbdefs-gen/envoy/extensions/transport_sockets/tls/v3/common.upbdefs.c +95 -95
- data/src/core/ext/upbdefs-gen/envoy/extensions/transport_sockets/tls/v3/tls.upbdefs.c +202 -191
- data/src/core/ext/upbdefs-gen/envoy/service/discovery/v3/discovery.upbdefs.c +148 -135
- data/src/core/ext/upbdefs-gen/envoy/service/discovery/v3/discovery.upbdefs.h +5 -0
- data/src/core/ext/upbdefs-gen/envoy/service/status/v3/csds.upbdefs.c +23 -22
- data/src/core/filter/filter_args.h +112 -0
- data/src/core/handshaker/http_connect/http_connect_handshaker.cc +1 -1
- data/src/core/lib/channel/promise_based_filter.h +5 -79
- data/src/core/lib/debug/trace_flags.cc +2 -0
- data/src/core/lib/debug/trace_flags.h +1 -0
- data/src/core/lib/event_engine/posix_engine/posix_endpoint.cc +14 -0
- data/src/core/lib/event_engine/posix_engine/posix_engine.cc +7 -2
- data/src/core/lib/event_engine/posix_engine/posix_engine.h +0 -2
- data/src/core/lib/event_engine/windows/windows_engine.cc +1 -0
- data/src/core/lib/experiments/experiments.cc +90 -39
- data/src/core/lib/experiments/experiments.h +43 -24
- data/src/core/lib/iomgr/event_engine_shims/endpoint.cc +1 -1
- data/src/core/lib/promise/activity.cc +2 -0
- data/src/core/lib/promise/activity.h +29 -8
- data/src/core/lib/promise/map.h +42 -0
- data/src/core/lib/promise/party.cc +36 -1
- data/src/core/lib/promise/party.h +13 -5
- data/src/core/lib/promise/sleep.h +1 -0
- data/src/core/lib/promise/status_flag.h +10 -0
- data/src/core/lib/resource_quota/arena.h +8 -0
- data/src/core/lib/resource_quota/connection_quota.h +4 -0
- data/src/core/lib/surface/call_utils.h +2 -0
- data/src/core/lib/surface/client_call.cc +43 -35
- data/src/core/lib/surface/client_call.h +5 -0
- data/src/core/lib/surface/event_string.cc +7 -1
- data/src/core/lib/surface/init_internally.h +13 -2
- data/src/core/lib/surface/server_call.cc +100 -85
- data/src/core/lib/surface/version.cc +2 -2
- data/src/core/lib/transport/call_filters.cc +10 -4
- data/src/core/lib/transport/call_filters.h +8 -0
- data/src/core/lib/transport/call_spine.cc +36 -71
- data/src/core/lib/transport/call_spine.h +131 -7
- data/src/core/lib/transport/call_state.h +132 -39
- data/src/core/lib/transport/interception_chain.cc +8 -0
- data/src/core/lib/transport/interception_chain.h +9 -0
- data/src/core/load_balancing/endpoint_list.cc +10 -0
- data/src/core/load_balancing/endpoint_list.h +13 -6
- data/src/core/load_balancing/lb_policy.h +0 -8
- data/src/core/load_balancing/pick_first/pick_first.cc +89 -56
- data/src/core/load_balancing/ring_hash/ring_hash.cc +158 -70
- data/src/core/load_balancing/ring_hash/ring_hash.h +4 -11
- data/src/core/load_balancing/round_robin/round_robin.cc +9 -14
- data/src/core/load_balancing/weighted_round_robin/weighted_round_robin.cc +12 -15
- data/src/core/resolver/dns/c_ares/dns_resolver_ares.cc +4 -4
- data/src/core/resolver/xds/xds_dependency_manager.cc +139 -135
- data/src/core/resolver/xds/xds_dependency_manager.h +24 -18
- data/src/core/resolver/xds/xds_resolver.cc +28 -47
- data/src/core/server/server.cc +290 -24
- data/src/core/server/server.h +199 -61
- data/src/core/server/xds_server_config_fetcher.cc +78 -142
- data/src/core/tsi/alts/handshaker/alts_handshaker_client.cc +1 -1
- data/src/core/util/backoff.cc +15 -4
- data/src/core/util/http_client/httpcli.cc +66 -18
- data/src/core/util/http_client/httpcli.h +14 -4
- data/src/core/util/matchers.h +5 -10
- data/src/core/util/ref_counted.h +1 -0
- data/src/core/util/ref_counted_ptr.h +1 -1
- data/src/core/util/useful.h +9 -11
- data/src/core/xds/grpc/xds_endpoint_parser.cc +54 -23
- data/src/core/xds/grpc/xds_metadata.h +8 -0
- data/src/core/xds/xds_client/xds_api.cc +0 -223
- data/src/core/xds/xds_client/xds_api.h +1 -133
- data/src/core/xds/xds_client/xds_client.cc +599 -466
- data/src/core/xds/xds_client/xds_client.h +107 -26
- data/src/core/xds/xds_client/xds_resource_type_impl.h +10 -5
- data/src/ruby/ext/grpc/extconf.rb +1 -0
- data/src/ruby/lib/grpc/version.rb +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/asn1/{a_bitstr.c → a_bitstr.cc} +3 -2
- data/third_party/boringssl-with-bazel/src/crypto/asn1/{a_d2i_fp.c → a_d2i_fp.cc} +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/asn1/{a_dup.c → a_dup.cc} +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/asn1/{a_i2d_fp.c → a_i2d_fp.cc} +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/asn1/{a_int.c → a_int.cc} +2 -1
- data/third_party/boringssl-with-bazel/src/crypto/asn1/{a_mbstr.c → a_mbstr.cc} +9 -7
- data/third_party/boringssl-with-bazel/src/crypto/asn1/{a_object.c → a_object.cc} +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/asn1/{a_strnid.c → a_strnid.cc} +7 -4
- data/third_party/boringssl-with-bazel/src/crypto/asn1/{a_type.c → a_type.cc} +4 -4
- data/third_party/boringssl-with-bazel/src/crypto/asn1/{asn1_lib.c → asn1_lib.cc} +4 -4
- data/third_party/boringssl-with-bazel/src/crypto/asn1/{asn_pack.c → asn_pack.cc} +2 -2
- data/third_party/boringssl-with-bazel/src/crypto/asn1/{posix_time.c → posix_time.cc} +2 -2
- data/third_party/boringssl-with-bazel/src/crypto/asn1/{tasn_dec.c → tasn_dec.cc} +4 -3
- data/third_party/boringssl-with-bazel/src/crypto/asn1/{tasn_enc.c → tasn_enc.cc} +9 -6
- data/third_party/boringssl-with-bazel/src/crypto/asn1/{tasn_fre.c → tasn_fre.cc} +14 -20
- data/third_party/boringssl-with-bazel/src/crypto/asn1/{tasn_new.c → tasn_new.cc} +7 -6
- data/third_party/boringssl-with-bazel/src/crypto/asn1/{tasn_utl.c → tasn_utl.cc} +13 -10
- data/third_party/boringssl-with-bazel/src/crypto/base64/{base64.c → base64.cc} +9 -12
- data/third_party/boringssl-with-bazel/src/crypto/bcm_support.h +7 -1
- data/third_party/boringssl-with-bazel/src/crypto/bio/{bio.c → bio.cc} +32 -58
- data/third_party/boringssl-with-bazel/src/crypto/bio/{bio_mem.c → bio_mem.cc} +8 -7
- data/third_party/boringssl-with-bazel/src/crypto/bio/{connect.c → connect.cc} +24 -16
- data/third_party/boringssl-with-bazel/src/crypto/bio/{file.c → file.cc} +3 -3
- data/third_party/boringssl-with-bazel/src/crypto/bio/{pair.c → pair.cc} +22 -20
- data/third_party/boringssl-with-bazel/src/crypto/bio/{printf.c → printf.cc} +2 -2
- data/third_party/boringssl-with-bazel/src/crypto/bio/{socket_helper.c → socket_helper.cc} +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/blake2/{blake2.c → blake2.cc} +2 -2
- data/third_party/boringssl-with-bazel/src/crypto/bn_extra/{bn_asn1.c → bn_asn1.cc} +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/bn_extra/{convert.c → convert.cc} +21 -21
- data/third_party/boringssl-with-bazel/src/crypto/buf/{buf.c → buf.cc} +6 -3
- data/third_party/boringssl-with-bazel/src/crypto/bytestring/{asn1_compat.c → asn1_compat.cc} +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/bytestring/{ber.c → ber.cc} +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/bytestring/{cbb.c → cbb.cc} +33 -49
- data/third_party/boringssl-with-bazel/src/crypto/bytestring/{cbs.c → cbs.cc} +20 -27
- data/third_party/boringssl-with-bazel/src/crypto/bytestring/internal.h +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/bytestring/{unicode.c → unicode.cc} +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/chacha/{chacha.c → chacha.cc} +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/chacha/internal.h +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/{e_aesctrhmac.c → e_aesctrhmac.cc} +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/{e_aesgcmsiv.c → e_aesgcmsiv.cc} +23 -26
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/{e_chacha20poly1305.c → e_chacha20poly1305.cc} +1 -8
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/{e_des.c → e_des.cc} +61 -49
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/{e_null.c → e_null.cc} +12 -9
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/{e_rc2.c → e_rc2.cc} +23 -19
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/{e_rc4.c → e_rc4.cc} +10 -8
- data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/{e_tls.c → e_tls.cc} +2 -1
- data/third_party/boringssl-with-bazel/src/crypto/conf/{conf.c → conf.cc} +17 -14
- data/third_party/boringssl-with-bazel/src/crypto/conf/internal.h +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/{cpu_aarch64_apple.c → cpu_aarch64_apple.cc} +2 -2
- data/third_party/boringssl-with-bazel/src/crypto/{cpu_aarch64_fuchsia.c → cpu_aarch64_fuchsia.cc} +2 -2
- data/third_party/boringssl-with-bazel/src/crypto/{cpu_aarch64_linux.c → cpu_aarch64_linux.cc} +2 -2
- data/third_party/boringssl-with-bazel/src/crypto/{cpu_aarch64_openbsd.c → cpu_aarch64_openbsd.cc} +4 -4
- data/third_party/boringssl-with-bazel/src/crypto/{cpu_aarch64_sysreg.c → cpu_aarch64_sysreg.cc} +3 -2
- data/third_party/boringssl-with-bazel/src/crypto/{cpu_aarch64_win.c → cpu_aarch64_win.cc} +2 -2
- data/third_party/boringssl-with-bazel/src/crypto/{cpu_arm_freebsd.c → cpu_arm_freebsd.cc} +3 -3
- data/third_party/boringssl-with-bazel/src/crypto/{cpu_arm_linux.c → cpu_arm_linux.cc} +5 -5
- data/third_party/boringssl-with-bazel/src/crypto/cpu_arm_linux.h +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/{cpu_intel.c → cpu_intel.cc} +47 -32
- data/third_party/boringssl-with-bazel/src/crypto/{crypto.c → crypto.cc} +6 -11
- data/third_party/boringssl-with-bazel/src/crypto/curve25519/{curve25519.c → curve25519.cc} +28 -31
- data/third_party/boringssl-with-bazel/src/crypto/curve25519/{curve25519_64_adx.c → curve25519_64_adx.cc} +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/curve25519/curve25519_tables.h +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/curve25519/internal.h +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/curve25519/{spake25519.c → spake25519.cc} +20 -16
- data/third_party/boringssl-with-bazel/src/crypto/dh_extra/{dh_asn1.c → dh_asn1.cc} +2 -2
- data/third_party/boringssl-with-bazel/src/crypto/digest_extra/{digest_extra.c → digest_extra.cc} +113 -31
- data/third_party/boringssl-with-bazel/src/crypto/dsa/{dsa.c → dsa.cc} +153 -154
- data/third_party/boringssl-with-bazel/src/crypto/dsa/{dsa_asn1.c → dsa_asn1.cc} +2 -2
- data/third_party/boringssl-with-bazel/src/crypto/dsa/internal.h +1 -3
- data/third_party/boringssl-with-bazel/src/crypto/ec_extra/{ec_asn1.c → ec_asn1.cc} +35 -0
- data/third_party/boringssl-with-bazel/src/crypto/ec_extra/{ec_derive.c → ec_derive.cc} +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/ec_extra/{hash_to_curve.c → hash_to_curve.cc} +66 -64
- data/third_party/boringssl-with-bazel/src/crypto/ec_extra/internal.h +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/ecdsa_extra/{ecdsa_asn1.c → ecdsa_asn1.cc} +15 -25
- data/third_party/boringssl-with-bazel/src/crypto/engine/{engine.c → engine.cc} +12 -8
- data/third_party/boringssl-with-bazel/src/crypto/err/{err.c → err.cc} +24 -27
- data/third_party/boringssl-with-bazel/src/crypto/err/internal.h +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/evp/{evp.c → evp.cc} +8 -9
- data/third_party/boringssl-with-bazel/src/crypto/evp/{evp_ctx.c → evp_ctx.cc} +7 -8
- data/third_party/boringssl-with-bazel/src/crypto/evp/{p_dh.c → p_dh.cc} +23 -14
- data/third_party/boringssl-with-bazel/src/crypto/evp/{p_dh_asn1.c → p_dh_asn1.cc} +38 -21
- data/third_party/boringssl-with-bazel/src/crypto/evp/{p_dsa_asn1.c → p_dsa_asn1.cc} +19 -24
- data/third_party/boringssl-with-bazel/src/crypto/evp/{p_ec.c → p_ec.cc} +20 -23
- data/third_party/boringssl-with-bazel/src/crypto/evp/{p_ec_asn1.c → p_ec_asn1.cc} +20 -20
- data/third_party/boringssl-with-bazel/src/crypto/evp/{p_ed25519.c → p_ed25519.cc} +22 -19
- data/third_party/boringssl-with-bazel/src/crypto/evp/{p_ed25519_asn1.c → p_ed25519_asn1.cc} +14 -13
- data/third_party/boringssl-with-bazel/src/crypto/evp/{p_hkdf.c → p_hkdf.cc} +18 -14
- data/third_party/boringssl-with-bazel/src/crypto/evp/{p_rsa.c → p_rsa.cc} +38 -37
- data/third_party/boringssl-with-bazel/src/crypto/evp/{p_rsa_asn1.c → p_rsa_asn1.cc} +16 -18
- data/third_party/boringssl-with-bazel/src/crypto/evp/{p_x25519.c → p_x25519.cc} +22 -19
- data/third_party/boringssl-with-bazel/src/crypto/evp/{p_x25519_asn1.c → p_x25519_asn1.cc} +18 -17
- data/third_party/boringssl-with-bazel/src/crypto/evp/{pbkdf.c → pbkdf.cc} +2 -2
- data/third_party/boringssl-with-bazel/src/crypto/evp/{print.c → print.cc} +4 -5
- data/third_party/boringssl-with-bazel/src/crypto/evp/{scrypt.c → scrypt.cc} +7 -5
- data/third_party/boringssl-with-bazel/src/crypto/{ex_data.c → ex_data.cc} +3 -4
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/{aes_nohw.c.inc → aes_nohw.cc.inc} +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/internal.h +1 -5
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/{key_wrap.c.inc → key_wrap.cc.inc} +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/{bcm.c → bcm.cc} +96 -101
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bcm_interface.h +165 -12
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/{add.c.inc → add.cc.inc} +1 -0
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/asm/{x86_64-gcc.c.inc → x86_64-gcc.cc.inc} +4 -4
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/{bn.c.inc → bn.cc.inc} +12 -24
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/{ctx.c.inc → ctx.cc.inc} +5 -7
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/{div.c.inc → div.cc.inc} +29 -38
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/{div_extra.c.inc → div_extra.cc.inc} +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/{exponentiation.c.inc → exponentiation.cc.inc} +22 -22
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/{gcd.c.inc → gcd.cc.inc} +3 -6
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/{gcd_extra.c.inc → gcd_extra.cc.inc} +33 -25
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/{montgomery.c.inc → montgomery.cc.inc} +10 -17
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/{mul.c.inc → mul.cc.inc} +11 -15
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/{prime.c.inc → prime.cc.inc} +31 -34
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/{shift.c.inc → shift.cc.inc} +3 -4
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/cipher/{aead.c.inc → aead.cc.inc} +18 -10
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/cipher/{cipher.c.inc → cipher.cc.inc} +6 -9
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/cipher/{e_aes.c.inc → e_aes.cc.inc} +46 -54
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/cmac/{cmac.c.inc → cmac.cc.inc} +6 -6
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/delocate.h +14 -10
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/dh/{dh.c.inc → dh.cc.inc} +15 -19
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/dh/internal.h +1 -3
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/digest/{digest.c.inc → digest.cc.inc} +17 -13
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/digest/{digests.c.inc → digests.cc.inc} +29 -113
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/digestsign/{digestsign.c.inc → digestsign.cc.inc} +3 -3
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/builtin_curves.h +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/{ec.c.inc → ec.cc.inc} +10 -15
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/{ec_key.c.inc → ec_key.cc.inc} +12 -14
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/{felem.c.inc → felem.cc.inc} +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/{oct.c.inc → oct.cc.inc} +5 -6
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/{p224-64.c.inc → p224-64.cc.inc} +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/p256-nistz-table.h +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/{p256-nistz.c.inc → p256-nistz.cc.inc} +15 -13
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/{p256.c.inc → p256.cc.inc} +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/p256_table.h +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/{scalar.c.inc → scalar.cc.inc} +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/{simple_mul.c.inc → simple_mul.cc.inc} +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/{util.c.inc → util.cc.inc} +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/{wnaf.c.inc → wnaf.cc.inc} +24 -15
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ecdh/{ecdh.c.inc → ecdh.cc.inc} +14 -5
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ecdsa/{ecdsa.c.inc → ecdsa.cc.inc} +6 -7
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ecdsa/internal.h +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/{fips_shared_support.c → fips_shared_support.cc} +2 -3
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/hkdf/{hkdf.c.inc → hkdf.cc.inc} +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/hmac/{hmac.c.inc → hmac.cc.inc} +3 -2
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/{gcm.c.inc → gcm.cc.inc} +69 -21
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/{gcm_nohw.c.inc → gcm_nohw.cc.inc} +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/internal.h +53 -33
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/{polyval.c.inc → polyval.cc.inc} +2 -3
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/{ctrdrbg.c.inc → ctrdrbg.cc.inc} +5 -4
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/internal.h +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rand/{rand.c.inc → rand.cc.inc} +20 -18
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/{blinding.c.inc → blinding.cc.inc} +5 -4
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/{padding.c.inc → padding.cc.inc} +21 -21
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/{rsa.c.inc → rsa.cc.inc} +77 -73
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/rsa/{rsa_impl.c.inc → rsa_impl.cc.inc} +50 -53
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/self_check/{fips.c.inc → fips.cc.inc} +14 -6
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/self_check/{self_check.c.inc → self_check.cc.inc} +56 -52
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/service_indicator/{service_indicator.c.inc → service_indicator.cc.inc} +10 -11
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/sha/internal.h +2 -4
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/sha/{sha1.c.inc → sha1.cc.inc} +26 -33
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/sha/{sha256.c.inc → sha256.cc.inc} +37 -55
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/sha/{sha512.c.inc → sha512.cc.inc} +48 -76
- data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/tls/internal.h +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/hpke/{hpke.c → hpke.cc} +7 -4
- data/third_party/boringssl-with-bazel/src/crypto/hrss/{hrss.c → hrss.cc} +53 -110
- data/third_party/boringssl-with-bazel/src/crypto/hrss/internal.h +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/internal.h +191 -248
- data/third_party/boringssl-with-bazel/src/crypto/keccak/internal.h +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/keccak/{keccak.c → keccak.cc} +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/kyber/internal.h +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/kyber/{kyber.c → kyber.cc} +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/lhash/{lhash.c → lhash.cc} +8 -7
- data/third_party/boringssl-with-bazel/src/crypto/{fipsmodule/md4/md4.c.inc → md4/md4.cc} +8 -12
- data/third_party/boringssl-with-bazel/src/crypto/{fipsmodule/md5 → md5}/internal.h +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/{fipsmodule/md5/md5.c.inc → md5/md5.cc} +4 -3
- data/third_party/boringssl-with-bazel/src/crypto/{mem.c → mem.cc} +34 -22
- data/third_party/boringssl-with-bazel/src/crypto/mldsa/internal.h +4 -1
- data/third_party/boringssl-with-bazel/src/crypto/mldsa/{mldsa.c → mldsa.cc} +646 -543
- data/third_party/boringssl-with-bazel/src/crypto/mlkem/internal.h +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/mlkem/mlkem.cc +8 -8
- data/third_party/boringssl-with-bazel/src/crypto/obj/{obj.c → obj.cc} +27 -30
- data/third_party/boringssl-with-bazel/src/crypto/pem/{pem_info.c → pem_info.cc} +2 -2
- data/third_party/boringssl-with-bazel/src/crypto/pem/{pem_lib.c → pem_lib.cc} +3 -4
- data/third_party/boringssl-with-bazel/src/crypto/pem/{pem_oth.c → pem_oth.cc} +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/pkcs7/internal.h +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/pkcs7/{pkcs7.c → pkcs7.cc} +5 -5
- data/third_party/boringssl-with-bazel/src/crypto/pkcs7/{pkcs7_x509.c → pkcs7_x509.cc} +26 -25
- data/third_party/boringssl-with-bazel/src/crypto/pkcs8/internal.h +2 -2
- data/third_party/boringssl-with-bazel/src/crypto/pkcs8/{p5_pbev2.c → p5_pbev2.cc} +2 -2
- data/third_party/boringssl-with-bazel/src/crypto/pkcs8/{pkcs8.c → pkcs8.cc} +159 -158
- data/third_party/boringssl-with-bazel/src/crypto/pkcs8/{pkcs8_x509.c → pkcs8_x509.cc} +90 -97
- data/third_party/boringssl-with-bazel/src/crypto/poly1305/internal.h +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/poly1305/{poly1305.c → poly1305.cc} +3 -3
- data/third_party/boringssl-with-bazel/src/crypto/poly1305/{poly1305_arm.c → poly1305_arm.cc} +4 -2
- data/third_party/boringssl-with-bazel/src/crypto/poly1305/{poly1305_vec.c → poly1305_vec.cc} +14 -11
- data/third_party/boringssl-with-bazel/src/crypto/pool/internal.h +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/pool/{pool.c → pool.cc} +12 -11
- data/third_party/boringssl-with-bazel/src/crypto/rand_extra/{deterministic.c → deterministic.cc} +2 -2
- data/third_party/boringssl-with-bazel/src/crypto/rand_extra/{fork_detect.c → fork_detect.cc} +11 -12
- data/third_party/boringssl-with-bazel/src/crypto/rand_extra/{forkunsafe.c → forkunsafe.cc} +2 -2
- data/third_party/boringssl-with-bazel/src/crypto/rand_extra/{getentropy.c → getentropy.cc} +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/rand_extra/getrandom_fillin.h +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/rand_extra/{ios.c → ios.cc} +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/rand_extra/{passive.c → passive.cc} +22 -18
- data/third_party/boringssl-with-bazel/src/crypto/rand_extra/{rand_extra.c → rand_extra.cc} +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/rand_extra/sysrand_internal.h +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/rand_extra/{trusty.c → trusty.cc} +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/rand_extra/{urandom.c → urandom.cc} +7 -7
- data/third_party/boringssl-with-bazel/src/crypto/rand_extra/{windows.c → windows.cc} +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/{refcount.c → refcount.cc} +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/rsa_extra/{rsa_asn1.c → rsa_asn1.cc} +2 -2
- data/third_party/boringssl-with-bazel/src/crypto/rsa_extra/{rsa_crypt.c → rsa_crypt.cc} +81 -78
- data/third_party/boringssl-with-bazel/src/crypto/rsa_extra/rsa_extra.cc +17 -0
- data/third_party/boringssl-with-bazel/src/crypto/sha/sha1.cc +52 -0
- data/third_party/boringssl-with-bazel/src/crypto/sha/sha256.cc +87 -0
- data/third_party/boringssl-with-bazel/src/crypto/sha/sha512.cc +104 -0
- data/third_party/boringssl-with-bazel/src/crypto/siphash/{siphash.c → siphash.cc} +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/slhdsa/address.h +123 -0
- data/third_party/boringssl-with-bazel/src/crypto/slhdsa/fors.cc +169 -0
- data/third_party/boringssl-with-bazel/src/crypto/slhdsa/fors.h +58 -0
- data/third_party/boringssl-with-bazel/src/crypto/slhdsa/internal.h +63 -0
- data/third_party/boringssl-with-bazel/src/crypto/slhdsa/merkle.cc +161 -0
- data/third_party/boringssl-with-bazel/src/crypto/slhdsa/merkle.h +70 -0
- data/third_party/boringssl-with-bazel/src/crypto/slhdsa/params.h +83 -0
- data/third_party/boringssl-with-bazel/src/crypto/slhdsa/slhdsa.cc +307 -0
- data/third_party/boringssl-with-bazel/src/crypto/slhdsa/thash.cc +173 -0
- data/third_party/boringssl-with-bazel/src/crypto/slhdsa/thash.h +85 -0
- data/third_party/boringssl-with-bazel/src/crypto/slhdsa/wots.cc +171 -0
- data/third_party/boringssl-with-bazel/src/crypto/slhdsa/wots.h +50 -0
- data/third_party/boringssl-with-bazel/src/crypto/stack/{stack.c → stack.cc} +10 -6
- data/third_party/boringssl-with-bazel/src/crypto/{thread_none.c → thread_none.cc} +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/{thread_pthread.c → thread_pthread.cc} +9 -8
- data/third_party/boringssl-with-bazel/src/crypto/{thread_win.c → thread_win.cc} +21 -17
- data/third_party/boringssl-with-bazel/src/crypto/trust_token/internal.h +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/trust_token/{pmbtoken.c → pmbtoken.cc} +146 -158
- data/third_party/boringssl-with-bazel/src/crypto/trust_token/{trust_token.c → trust_token.cc} +19 -21
- data/third_party/boringssl-with-bazel/src/crypto/trust_token/{voprf.c → voprf.cc} +165 -169
- data/third_party/boringssl-with-bazel/src/crypto/x509/{a_digest.c → a_digest.cc} +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/x509/{a_sign.c → a_sign.cc} +37 -34
- data/third_party/boringssl-with-bazel/src/crypto/x509/{a_verify.c → a_verify.cc} +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/x509/{algorithm.c → algorithm.cc} +1 -1
- data/third_party/boringssl-with-bazel/src/crypto/x509/{asn1_gen.c → asn1_gen.cc} +5 -6
- data/third_party/boringssl-with-bazel/src/crypto/x509/{by_dir.c → by_dir.cc} +7 -6
- data/third_party/boringssl-with-bazel/src/crypto/x509/{policy.c → policy.cc} +188 -178
- data/third_party/boringssl-with-bazel/src/crypto/x509/{rsa_pss.c → rsa_pss.cc} +48 -44
- data/third_party/boringssl-with-bazel/src/crypto/x509/{v3_akey.c → v3_akey.cc} +4 -2
- data/third_party/boringssl-with-bazel/src/crypto/x509/{v3_alt.c → v3_alt.cc} +5 -5
- data/third_party/boringssl-with-bazel/src/crypto/x509/{v3_bcons.c → v3_bcons.cc} +3 -1
- data/third_party/boringssl-with-bazel/src/crypto/x509/{v3_bitst.c → v3_bitst.cc} +6 -3
- data/third_party/boringssl-with-bazel/src/crypto/x509/{v3_conf.c → v3_conf.cc} +5 -5
- data/third_party/boringssl-with-bazel/src/crypto/x509/{v3_cpols.c → v3_cpols.cc} +47 -41
- data/third_party/boringssl-with-bazel/src/crypto/x509/{v3_crld.c → v3_crld.cc} +3 -2
- data/third_party/boringssl-with-bazel/src/crypto/x509/{v3_enum.c → v3_enum.cc} +5 -2
- data/third_party/boringssl-with-bazel/src/crypto/x509/{v3_extku.c → v3_extku.cc} +3 -1
- data/third_party/boringssl-with-bazel/src/crypto/x509/{v3_genn.c → v3_genn.cc} +7 -7
- data/third_party/boringssl-with-bazel/src/crypto/x509/{v3_ia5.c → v3_ia5.cc} +3 -2
- data/third_party/boringssl-with-bazel/src/crypto/x509/{v3_info.c → v3_info.cc} +4 -2
- data/third_party/boringssl-with-bazel/src/crypto/x509/{v3_int.c → v3_int.cc} +3 -1
- data/third_party/boringssl-with-bazel/src/crypto/x509/{v3_lib.c → v3_lib.cc} +9 -6
- data/third_party/boringssl-with-bazel/src/crypto/x509/{v3_ncons.c → v3_ncons.cc} +3 -3
- data/third_party/boringssl-with-bazel/src/crypto/x509/{v3_ocsp.c → v3_ocsp.cc} +4 -1
- data/third_party/boringssl-with-bazel/src/crypto/x509/{v3_pcons.c → v3_pcons.cc} +3 -3
- data/third_party/boringssl-with-bazel/src/crypto/x509/{v3_pmaps.c → v3_pmaps.cc} +3 -3
- data/third_party/boringssl-with-bazel/src/crypto/x509/{v3_prn.c → v3_prn.cc} +2 -1
- data/third_party/boringssl-with-bazel/src/crypto/x509/{v3_purp.c → v3_purp.cc} +16 -8
- data/third_party/boringssl-with-bazel/src/crypto/x509/{v3_skey.c → v3_skey.cc} +6 -3
- data/third_party/boringssl-with-bazel/src/crypto/x509/{v3_utl.c → v3_utl.cc} +15 -10
- data/third_party/boringssl-with-bazel/src/crypto/x509/{x509_att.c → x509_att.cc} +3 -2
- data/third_party/boringssl-with-bazel/src/crypto/x509/{x509_lu.c → x509_lu.cc} +6 -5
- data/third_party/boringssl-with-bazel/src/crypto/x509/{x509_v3.c → x509_v3.cc} +2 -2
- data/third_party/boringssl-with-bazel/src/crypto/x509/{x509_vfy.c → x509_vfy.cc} +216 -212
- data/third_party/boringssl-with-bazel/src/crypto/x509/{x509_vpm.c → x509_vpm.cc} +55 -13
- data/third_party/boringssl-with-bazel/src/crypto/x509/{x509spki.c → x509spki.cc} +3 -3
- data/third_party/boringssl-with-bazel/src/crypto/x509/{x_all.c → x_all.cc} +10 -6
- data/third_party/boringssl-with-bazel/src/crypto/x509/{x_crl.c → x_crl.cc} +6 -6
- data/third_party/boringssl-with-bazel/src/crypto/x509/{x_name.c → x_name.cc} +39 -32
- data/third_party/boringssl-with-bazel/src/crypto/x509/{x_pubkey.c → x_pubkey.cc} +4 -2
- data/third_party/boringssl-with-bazel/src/crypto/x509/{x_x509.c → x_x509.cc} +48 -44
- data/third_party/boringssl-with-bazel/src/crypto/x509/{x_x509a.c → x_x509a.cc} +4 -2
- data/third_party/boringssl-with-bazel/src/gen/crypto/{err_data.c → err_data.cc} +359 -358
- data/third_party/boringssl-with-bazel/src/include/openssl/aead.h +1 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/asm_base.h +1 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/asn1_mac.h +1 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/asn1t.h +237 -275
- data/third_party/boringssl-with-bazel/src/include/openssl/base.h +12 -5
- data/third_party/boringssl-with-bazel/src/include/openssl/bcm_public.h +82 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/blake2.h +1 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/buffer.h +1 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/bytestring.h +1 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/chacha.h +1 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/cmac.h +1 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/cpu.h +1 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/crypto.h +13 -2
- data/third_party/boringssl-with-bazel/src/include/openssl/ctrdrbg.h +1 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/curve25519.h +1 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/dh.h +4 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/digest.h +6 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/dsa.h +4 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/dtls1.h +1 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/e_os2.h +1 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/ec_key.h +17 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/engine.h +1 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/evp.h +1 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/experimental/kyber.h +1 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/hkdf.h +1 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/hpke.h +1 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/hrss.h +1 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/is_boringssl.h +1 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/kdf.h +1 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/mldsa.h +8 -8
- data/third_party/boringssl-with-bazel/src/include/openssl/mlkem.h +1 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/obj_mac.h +1 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/objects.h +1 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/opensslconf.h +1 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/opensslv.h +1 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/ossl_typ.h +1 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/pkcs12.h +1 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/pkcs7.h +1 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/pkcs8.h +2 -2
- data/third_party/boringssl-with-bazel/src/include/openssl/poly1305.h +1 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/pool.h +1 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/posix_time.h +1 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/rand.h +1 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/rsa.h +10 -5
- data/third_party/boringssl-with-bazel/src/include/openssl/safestack.h +1 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/sha.h +2 -40
- data/third_party/boringssl-with-bazel/src/include/openssl/siphash.h +1 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/slhdsa.h +133 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/span.h +6 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/srtp.h +1 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/ssl.h +160 -116
- data/third_party/boringssl-with-bazel/src/include/openssl/ssl3.h +1 -0
- data/third_party/boringssl-with-bazel/src/include/openssl/target.h +1 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/thread.h +2 -2
- data/third_party/boringssl-with-bazel/src/include/openssl/time.h +1 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/trust_token.h +1 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/x509_vfy.h +1 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/x509v3.h +1 -1
- data/third_party/boringssl-with-bazel/src/include/openssl/x509v3_errors.h +2 -2
- data/third_party/boringssl-with-bazel/src/ssl/bio_ssl.cc +2 -6
- data/third_party/boringssl-with-bazel/src/ssl/d1_both.cc +667 -322
- data/third_party/boringssl-with-bazel/src/ssl/d1_lib.cc +116 -119
- data/third_party/boringssl-with-bazel/src/ssl/d1_pkt.cc +163 -21
- data/third_party/boringssl-with-bazel/src/ssl/d1_srtp.cc +4 -12
- data/third_party/boringssl-with-bazel/src/ssl/dtls_method.cc +94 -49
- data/third_party/boringssl-with-bazel/src/ssl/dtls_record.cc +296 -198
- data/third_party/boringssl-with-bazel/src/ssl/encrypted_client_hello.cc +23 -14
- data/third_party/boringssl-with-bazel/src/ssl/extensions.cc +363 -343
- data/third_party/boringssl-with-bazel/src/ssl/handoff.cc +48 -58
- data/third_party/boringssl-with-bazel/src/ssl/handshake.cc +44 -36
- data/third_party/boringssl-with-bazel/src/ssl/handshake_client.cc +145 -159
- data/third_party/boringssl-with-bazel/src/ssl/handshake_server.cc +65 -58
- data/third_party/boringssl-with-bazel/src/ssl/internal.h +910 -356
- data/third_party/boringssl-with-bazel/src/ssl/s3_both.cc +29 -41
- data/third_party/boringssl-with-bazel/src/ssl/s3_lib.cc +13 -11
- data/third_party/boringssl-with-bazel/src/ssl/s3_pkt.cc +2 -2
- data/third_party/boringssl-with-bazel/src/ssl/ssl_aead_ctx.cc +90 -183
- data/third_party/boringssl-with-bazel/src/ssl/ssl_asn1.cc +38 -64
- data/third_party/boringssl-with-bazel/src/ssl/ssl_buffer.cc +1 -1
- data/third_party/boringssl-with-bazel/src/ssl/ssl_cert.cc +103 -44
- data/third_party/boringssl-with-bazel/src/ssl/ssl_cipher.cc +210 -220
- data/third_party/boringssl-with-bazel/src/ssl/ssl_credential.cc +70 -12
- data/third_party/boringssl-with-bazel/src/ssl/ssl_key_share.cc +20 -17
- data/third_party/boringssl-with-bazel/src/ssl/ssl_lib.cc +146 -169
- data/third_party/boringssl-with-bazel/src/ssl/ssl_privkey.cc +15 -16
- data/third_party/boringssl-with-bazel/src/ssl/ssl_session.cc +79 -95
- data/third_party/boringssl-with-bazel/src/ssl/ssl_stat.cc +3 -9
- data/third_party/boringssl-with-bazel/src/ssl/ssl_transcript.cc +91 -16
- data/third_party/boringssl-with-bazel/src/ssl/ssl_versions.cc +30 -16
- data/third_party/boringssl-with-bazel/src/ssl/ssl_x509.cc +51 -56
- data/third_party/boringssl-with-bazel/src/ssl/t1_enc.cc +22 -25
- data/third_party/boringssl-with-bazel/src/ssl/tls13_both.cc +43 -27
- data/third_party/boringssl-with-bazel/src/ssl/tls13_client.cc +63 -59
- data/third_party/boringssl-with-bazel/src/ssl/tls13_enc.cc +204 -121
- data/third_party/boringssl-with-bazel/src/ssl/tls13_server.cc +86 -59
- data/third_party/boringssl-with-bazel/src/ssl/tls_method.cc +51 -62
- data/third_party/boringssl-with-bazel/src/ssl/tls_record.cc +37 -25
- data/third_party/boringssl-with-bazel/src/third_party/fiat/curve25519_32.h +6 -0
- data/third_party/boringssl-with-bazel/src/third_party/fiat/curve25519_64.h +6 -0
- data/third_party/boringssl-with-bazel/src/third_party/fiat/curve25519_64_adx.h +4 -1
- data/third_party/boringssl-with-bazel/src/third_party/fiat/p256_32.h +1 -1
- data/third_party/boringssl-with-bazel/src/third_party/fiat/p256_64.h +3 -0
- metadata +339 -339
- data/src/core/ext/upb-gen/envoy/config/trace/v3/opencensus.upb.h +0 -426
- data/src/core/ext/upb-gen/envoy/config/trace/v3/opencensus.upb_minitable.c +0 -87
- data/src/core/ext/upb-gen/envoy/config/trace/v3/opencensus.upb_minitable.h +0 -32
- data/src/core/ext/upb-gen/opencensus/proto/trace/v1/trace_config.upb.h +0 -408
- data/src/core/ext/upb-gen/opencensus/proto/trace/v1/trace_config.upb_minitable.c +0 -124
- data/src/core/ext/upb-gen/opencensus/proto/trace/v1/trace_config.upb_minitable.h +0 -38
- data/src/core/ext/upbdefs-gen/envoy/config/trace/v3/opencensus.upbdefs.c +0 -108
- data/src/core/ext/upbdefs-gen/envoy/config/trace/v3/opencensus.upbdefs.h +0 -33
- data/src/core/ext/upbdefs-gen/opencensus/proto/trace/v1/trace_config.upbdefs.c +0 -67
- data/src/core/ext/upbdefs-gen/opencensus/proto/trace/v1/trace_config.upbdefs.h +0 -48
- data/src/core/util/atm.cc +0 -34
- data/third_party/boringssl-with-bazel/src/crypto/dilithium/dilithium.c +0 -1539
- data/third_party/boringssl-with-bazel/src/crypto/dilithium/internal.h +0 -58
- data/third_party/boringssl-with-bazel/src/crypto/spx/address.c +0 -101
- data/third_party/boringssl-with-bazel/src/crypto/spx/address.h +0 -50
- data/third_party/boringssl-with-bazel/src/crypto/spx/fors.c +0 -133
- data/third_party/boringssl-with-bazel/src/crypto/spx/fors.h +0 -54
- data/third_party/boringssl-with-bazel/src/crypto/spx/merkle.c +0 -150
- data/third_party/boringssl-with-bazel/src/crypto/spx/merkle.h +0 -61
- data/third_party/boringssl-with-bazel/src/crypto/spx/params.h +0 -71
- data/third_party/boringssl-with-bazel/src/crypto/spx/spx.c +0 -140
- data/third_party/boringssl-with-bazel/src/crypto/spx/spx_util.c +0 -53
- data/third_party/boringssl-with-bazel/src/crypto/spx/spx_util.h +0 -44
- data/third_party/boringssl-with-bazel/src/crypto/spx/thash.c +0 -136
- data/third_party/boringssl-with-bazel/src/crypto/spx/thash.h +0 -70
- data/third_party/boringssl-with-bazel/src/crypto/spx/wots.c +0 -135
- data/third_party/boringssl-with-bazel/src/crypto/spx/wots.h +0 -45
- data/third_party/boringssl-with-bazel/src/include/openssl/experimental/dilithium.h +0 -129
- data/third_party/boringssl-with-bazel/src/include/openssl/experimental/spx.h +0 -90
- /data/third_party/boringssl-with-bazel/src/crypto/asn1/{a_bool.c → a_bool.cc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/asn1/{a_gentm.c → a_gentm.cc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/asn1/{a_octet.c → a_octet.cc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/asn1/{a_strex.c → a_strex.cc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/asn1/{a_time.c → a_time.cc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/asn1/{a_utctm.c → a_utctm.cc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/asn1/{asn1_par.c → asn1_par.cc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/asn1/{f_int.c → f_int.cc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/asn1/{f_string.c → f_string.cc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/asn1/{tasn_typ.c → tasn_typ.cc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/bio/{errno.c → errno.cc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/bio/{fd.c → fd.cc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/bio/{hexdump.c → hexdump.cc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/bio/{socket.c → socket.cc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/{cipher_extra.c → cipher_extra.cc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/{derive_key.c → derive_key.cc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/cipher_extra/{tls_cbc.c → tls_cbc.cc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/des/{des.c → des.cc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/dh_extra/{params.c → params.cc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/ecdh_extra/{ecdh_extra.c → ecdh_extra.cc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/evp/{evp_asn1.c → evp_asn1.cc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/evp/{sign.c → sign.cc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/{aes.c.inc → aes.cc.inc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/{mode_wrappers.c.inc → mode_wrappers.cc.inc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/{bytes.c.inc → bytes.cc.inc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/{cmp.c.inc → cmp.cc.inc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/{generic.c.inc → generic.cc.inc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/{jacobi.c.inc → jacobi.cc.inc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/{montgomery_inv.c.inc → montgomery_inv.cc.inc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/{random.c.inc → random.cc.inc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/{rsaz_exp.c.inc → rsaz_exp.cc.inc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/bn/{sqrt.c.inc → sqrt.cc.inc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/cipher/{e_aesccm.c.inc → e_aesccm.cc.inc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/dh/{check.c.inc → check.cc.inc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/{ec_montgomery.c.inc → ec_montgomery.cc.inc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/ec/{simple.c.inc → simple.cc.inc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/{cbc.c.inc → cbc.cc.inc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/{cfb.c.inc → cfb.cc.inc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/{ctr.c.inc → ctr.cc.inc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/{ofb.c.inc → ofb.cc.inc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/tls/{kdf.c.inc → kdf.cc.inc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/obj/{obj_xref.c → obj_xref.cc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/pem/{pem_all.c → pem_all.cc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/pem/{pem_pk8.c → pem_pk8.cc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/pem/{pem_pkey.c → pem_pkey.cc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/pem/{pem_x509.c → pem_x509.cc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/pem/{pem_xaux.c → pem_xaux.cc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/rc4/{rc4.c → rc4.cc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/rsa_extra/{rsa_print.c → rsa_print.cc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/{thread.c → thread.cc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/x509/{by_file.c → by_file.cc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/x509/{i2d_pr.c → i2d_pr.cc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/x509/{name_print.c → name_print.cc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/x509/{t_crl.c → t_crl.cc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/x509/{t_req.c → t_req.cc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/x509/{t_x509.c → t_x509.cc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/x509/{t_x509a.c → t_x509a.cc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/x509/{v3_akeya.c → v3_akeya.cc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/x509/{x509.c → x509.cc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/x509/{x509_cmp.c → x509_cmp.cc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/x509/{x509_d2.c → x509_d2.cc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/x509/{x509_def.c → x509_def.cc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/x509/{x509_ext.c → x509_ext.cc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/x509/{x509_obj.c → x509_obj.cc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/x509/{x509_req.c → x509_req.cc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/x509/{x509_set.c → x509_set.cc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/x509/{x509_trs.c → x509_trs.cc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/x509/{x509_txt.c → x509_txt.cc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/x509/{x509cset.c → x509cset.cc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/x509/{x509name.c → x509name.cc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/x509/{x509rset.c → x509rset.cc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/x509/{x_algor.c → x_algor.cc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/x509/{x_attrib.c → x_attrib.cc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/x509/{x_exten.c → x_exten.cc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/x509/{x_req.c → x_req.cc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/x509/{x_sig.c → x_sig.cc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/x509/{x_spki.c → x_spki.cc} +0 -0
- /data/third_party/boringssl-with-bazel/src/crypto/x509/{x_val.c → x_val.cc} +0 -0
@@ -126,16 +126,6 @@
|
|
126
126
|
#include <stdlib.h>
|
127
127
|
#endif
|
128
128
|
|
129
|
-
#if !defined(__cplusplus)
|
130
|
-
#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 201112L
|
131
|
-
// BoringSSL requires C11 to build the library. The most likely cause of
|
132
|
-
// pre-C11 modes is stale -std=c99 or -std=gnu99 flags in build configuration.
|
133
|
-
// Such flags can be removed. If building with MSVC, build with /std:c11.
|
134
|
-
#error "BoringSSL must be built in C11 mode or higher."
|
135
|
-
#endif
|
136
|
-
#include <stdalign.h>
|
137
|
-
#endif
|
138
|
-
|
139
129
|
#if defined(OPENSSL_THREADS) && \
|
140
130
|
(!defined(OPENSSL_WINDOWS) || defined(__MINGW32__))
|
141
131
|
#include <pthread.h>
|
@@ -147,29 +137,11 @@
|
|
147
137
|
#define OPENSSL_WINDOWS_THREADS
|
148
138
|
#endif
|
149
139
|
|
150
|
-
|
151
|
-
#
|
152
|
-
#if !defined(OPENSSL_C11_ATOMIC) && defined(OPENSSL_THREADS) && \
|
153
|
-
!defined(__STDC_NO_ATOMICS__)
|
154
|
-
#define OPENSSL_C11_ATOMIC
|
155
|
-
#endif
|
156
|
-
|
157
|
-
#if defined(OPENSSL_C11_ATOMIC)
|
158
|
-
#include <stdatomic.h>
|
159
|
-
#endif
|
160
|
-
|
161
|
-
// Older MSVC does not support C11 atomics, so we fallback to the Windows APIs.
|
162
|
-
// When both are available (e.g. clang-cl), we prefer the C11 ones. The Windows
|
163
|
-
// APIs don't allow some operations to be implemented as efficiently. This can
|
164
|
-
// be removed once we can rely on
|
165
|
-
// https://devblogs.microsoft.com/cppblog/c11-atomics-in-visual-studio-2022-version-17-5-preview-2/
|
166
|
-
#if !defined(OPENSSL_C11_ATOMIC) && defined(OPENSSL_THREADS) && \
|
167
|
-
defined(OPENSSL_WINDOWS)
|
168
|
-
#define OPENSSL_WINDOWS_ATOMIC
|
140
|
+
#if defined(OPENSSL_THREADS)
|
141
|
+
#include <atomic>
|
169
142
|
#endif
|
170
|
-
#endif // !__cplusplus
|
171
143
|
|
172
|
-
#if defined(OPENSSL_WINDOWS_THREADS)
|
144
|
+
#if defined(OPENSSL_WINDOWS_THREADS)
|
173
145
|
OPENSSL_MSVC_PRAGMA(warning(push, 3))
|
174
146
|
#include <windows.h>
|
175
147
|
OPENSSL_MSVC_PRAGMA(warning(pop))
|
@@ -219,33 +191,35 @@ typedef __uint128_t uint128_t;
|
|
219
191
|
// These may be bugs in the toolchain definition, but just disable it for now.
|
220
192
|
// EDK2's toolchain is missing __udivti3 (b/339380897) so cannot support
|
221
193
|
// 128-bit division currently.
|
222
|
-
#if !defined(_MSC_VER) && !defined(OPENSSL_NANOLIBC) &&
|
194
|
+
#if !defined(_MSC_VER) && !defined(OPENSSL_NANOLIBC) && \
|
195
|
+
!defined(__EDK2_BORINGSSL__)
|
223
196
|
#define BORINGSSL_CAN_DIVIDE_UINT128
|
224
197
|
#endif
|
225
198
|
#endif
|
226
199
|
|
227
200
|
#define OPENSSL_ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0]))
|
228
201
|
|
202
|
+
#if defined(__clang__) && __clang_major__ >= 5
|
203
|
+
#if __has_attribute(fallthrough)
|
204
|
+
#define OPENSSL_CAN_USE_ATTR_FALLTHROUGH
|
205
|
+
#endif
|
206
|
+
#endif
|
207
|
+
|
229
208
|
// Have a generic fall-through for different versions of C/C++.
|
230
209
|
#if defined(__cplusplus) && __cplusplus >= 201703L
|
231
210
|
#define OPENSSL_FALLTHROUGH [[fallthrough]]
|
232
211
|
#elif defined(__cplusplus) && __cplusplus >= 201103L && defined(__clang__)
|
233
212
|
#define OPENSSL_FALLTHROUGH [[clang::fallthrough]]
|
234
|
-
#elif defined(__cplusplus) && __cplusplus >= 201103L && defined(__GNUC__)
|
235
|
-
__GNUC__ >= 7
|
213
|
+
#elif defined(__cplusplus) && __cplusplus >= 201103L && defined(__GNUC__)
|
236
214
|
#define OPENSSL_FALLTHROUGH [[gnu::fallthrough]]
|
237
|
-
#elif defined(__GNUC__)
|
238
|
-
#define OPENSSL_FALLTHROUGH __attribute__
|
239
|
-
#elif defined(
|
240
|
-
#if __has_attribute(fallthrough) && __clang_major__ >= 5
|
215
|
+
#elif defined(__GNUC__)
|
216
|
+
#define OPENSSL_FALLTHROUGH __attribute__((fallthrough))
|
217
|
+
#elif defined(OPENSSL_CAN_USE_ATTR_FALLTHROUGH)
|
241
218
|
// Clang 3.5, at least, complains about "error: declaration does not declare
|
242
219
|
// anything", possibily because we put a semicolon after this macro in
|
243
220
|
// practice. Thus limit it to >= Clang 5, which does work.
|
244
|
-
#define OPENSSL_FALLTHROUGH __attribute__
|
245
|
-
#else
|
246
|
-
#define OPENSSL_FALLTHROUGH
|
247
|
-
#endif
|
248
|
-
#else // C++11 on gcc 6, and all other cases
|
221
|
+
#define OPENSSL_FALLTHROUGH __attribute__((fallthrough))
|
222
|
+
#else // all other cases
|
249
223
|
#define OPENSSL_FALLTHROUGH
|
250
224
|
#endif
|
251
225
|
|
@@ -311,8 +285,8 @@ OPENSSL_INLINE void OPENSSL_enable_malloc_failures_for_testing(void) {}
|
|
311
285
|
// Pointer utility functions.
|
312
286
|
|
313
287
|
// buffers_alias returns one if |a| and |b| alias and zero otherwise.
|
314
|
-
static inline int buffers_alias(const void *a, size_t a_bytes,
|
315
|
-
|
288
|
+
static inline int buffers_alias(const void *a, size_t a_bytes, const void *b,
|
289
|
+
size_t b_bytes) {
|
316
290
|
// Cast |a| and |b| to integers. In C, pointer comparisons between unrelated
|
317
291
|
// objects are undefined whereas pointer to integer conversions are merely
|
318
292
|
// implementation-defined. We assume the implementation defined it in a sane
|
@@ -448,7 +422,7 @@ static inline crypto_word_t constant_time_lt_w(crypto_word_t a,
|
|
448
422
|
// (assert (not (= (= #x00000001 (bvlshr (lt a b) #x0000001f)) (bvult a b))))
|
449
423
|
// (check-sat)
|
450
424
|
// (get-model)
|
451
|
-
return constant_time_msb_w(a^((a^b)|((a-b)^a)));
|
425
|
+
return constant_time_msb_w(a ^ ((a ^ b) | ((a - b) ^ a)));
|
452
426
|
}
|
453
427
|
|
454
428
|
// constant_time_lt_8 acts like |constant_time_lt_w| but returns an 8-bit
|
@@ -479,9 +453,8 @@ static inline crypto_word_t constant_time_is_zero_w(crypto_word_t a) {
|
|
479
453
|
//
|
480
454
|
// (declare-fun a () (_ BitVec 32))
|
481
455
|
//
|
482
|
-
// (assert (not (= (= #x00000001 (bvlshr (is_zero a) #x0000001f)) (= a
|
483
|
-
// (check-sat)
|
484
|
-
// (get-model)
|
456
|
+
// (assert (not (= (= #x00000001 (bvlshr (is_zero a) #x0000001f)) (= a
|
457
|
+
// #x00000000)))) (check-sat) (get-model)
|
485
458
|
return constant_time_msb_w(~a & (a - 1));
|
486
459
|
}
|
487
460
|
|
@@ -577,10 +550,10 @@ static inline void constant_time_conditional_memxor(void *dst, const void *src,
|
|
577
550
|
#if defined(__GNUC__) && !defined(__clang__)
|
578
551
|
// gcc 13.2.0 doesn't automatically vectorize this loop regardless of barrier
|
579
552
|
typedef uint8_t v32u8 __attribute__((vector_size(32), aligned(1), may_alias));
|
580
|
-
size_t n_vec = n
|
581
|
-
v32u8 masks = ((uint8_t)mask-(v32u8){});
|
553
|
+
size_t n_vec = n & ~(size_t)31;
|
554
|
+
v32u8 masks = ((uint8_t)mask - (v32u8){}); // broadcast
|
582
555
|
for (size_t i = 0; i < n_vec; i += 32) {
|
583
|
-
*(v32u8*)&out[i] ^= masks & *(v32u8*)&in[i];
|
556
|
+
*(v32u8 *)&out[i] ^= masks & *(v32u8 *)&in[i];
|
584
557
|
}
|
585
558
|
out += n_vec;
|
586
559
|
n -= n_vec;
|
@@ -671,73 +644,28 @@ OPENSSL_EXPORT void CRYPTO_once(CRYPTO_once_t *once, void (*init)(void));
|
|
671
644
|
// The following functions provide an API analogous to <stdatomic.h> from C11
|
672
645
|
// and abstract between a few variations on atomics we need to support.
|
673
646
|
|
674
|
-
#if defined(
|
675
|
-
|
676
|
-
// In C++, we can't easily detect whether C will use |OPENSSL_C11_ATOMIC| or
|
677
|
-
// |OPENSSL_WINDOWS_ATOMIC|. Instead, we define a layout-compatible type without
|
678
|
-
// the corresponding functions. When we can rely on C11 atomics in MSVC, that
|
679
|
-
// will no longer be a concern.
|
680
|
-
typedef uint32_t CRYPTO_atomic_u32;
|
681
|
-
|
682
|
-
#elif defined(OPENSSL_C11_ATOMIC)
|
683
|
-
|
684
|
-
typedef _Atomic uint32_t CRYPTO_atomic_u32;
|
685
|
-
|
686
|
-
// This should be const, but the |OPENSSL_WINDOWS_ATOMIC| implementation is not
|
687
|
-
// const due to Windows limitations. When we can rely on C11 atomics, make this
|
688
|
-
// const-correct.
|
689
|
-
OPENSSL_INLINE uint32_t CRYPTO_atomic_load_u32(CRYPTO_atomic_u32 *val) {
|
690
|
-
return atomic_load(val);
|
691
|
-
}
|
692
|
-
|
693
|
-
OPENSSL_INLINE int CRYPTO_atomic_compare_exchange_weak_u32(
|
694
|
-
CRYPTO_atomic_u32 *val, uint32_t *expected, uint32_t desired) {
|
695
|
-
return atomic_compare_exchange_weak(val, expected, desired);
|
696
|
-
}
|
697
|
-
|
698
|
-
OPENSSL_INLINE void CRYPTO_atomic_store_u32(CRYPTO_atomic_u32 *val,
|
699
|
-
uint32_t desired) {
|
700
|
-
atomic_store(val, desired);
|
701
|
-
}
|
647
|
+
#if defined(OPENSSL_THREADS)
|
702
648
|
|
703
|
-
|
649
|
+
using CRYPTO_atomic_u32 = std::atomic<uint32_t>;
|
704
650
|
|
705
|
-
|
651
|
+
static_assert(sizeof(CRYPTO_atomic_u32) == sizeof(uint32_t), "");
|
706
652
|
|
707
|
-
|
708
|
-
|
709
|
-
// to optimize this to a true atomic read, and Windows does not provide an
|
710
|
-
// InterlockedLoad function.
|
711
|
-
//
|
712
|
-
// The Windows documentation [1] does say "Simple reads and writes to
|
713
|
-
// properly-aligned 32-bit variables are atomic operations", but this is not
|
714
|
-
// phrased in terms of the C11 and C++11 memory models, and indeed a read or
|
715
|
-
// write seems to produce slightly different code on MSVC than a sequentially
|
716
|
-
// consistent std::atomic::load in C++. Moreover, it is unclear if non-MSVC
|
717
|
-
// compilers on Windows provide the same guarantees. Thus we avoid relying on
|
718
|
-
// this and instead still use an interlocked function. This is still
|
719
|
-
// preferable a global mutex, and eventually this code will be replaced by
|
720
|
-
// [2]. Additionally, on clang-cl, we'll use the |OPENSSL_C11_ATOMIC| path.
|
721
|
-
//
|
722
|
-
// [1] https://learn.microsoft.com/en-us/windows/win32/sync/interlocked-variable-access
|
723
|
-
// [2] https://devblogs.microsoft.com/cppblog/c11-atomics-in-visual-studio-2022-version-17-5-preview-2/
|
724
|
-
return (uint32_t)InterlockedCompareExchange(val, 0, 0);
|
653
|
+
inline uint32_t CRYPTO_atomic_load_u32(const CRYPTO_atomic_u32 *val) {
|
654
|
+
return val->load(std::memory_order_seq_cst);
|
725
655
|
}
|
726
656
|
|
727
|
-
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
|
732
|
-
return actual == expected;
|
657
|
+
inline bool CRYPTO_atomic_compare_exchange_weak_u32(CRYPTO_atomic_u32 *val,
|
658
|
+
uint32_t *expected,
|
659
|
+
uint32_t desired) {
|
660
|
+
return val->compare_exchange_weak(
|
661
|
+
*expected, desired, std::memory_order_seq_cst, std::memory_order_seq_cst);
|
733
662
|
}
|
734
663
|
|
735
|
-
|
736
|
-
|
737
|
-
InterlockedExchange(val, (LONG)desired);
|
664
|
+
inline void CRYPTO_atomic_store_u32(CRYPTO_atomic_u32 *val, uint32_t desired) {
|
665
|
+
val->store(desired, std::memory_order_seq_cst);
|
738
666
|
}
|
739
667
|
|
740
|
-
#
|
668
|
+
#else
|
741
669
|
|
742
670
|
typedef uint32_t CRYPTO_atomic_u32;
|
743
671
|
|
@@ -760,12 +688,6 @@ OPENSSL_INLINE void CRYPTO_atomic_store_u32(CRYPTO_atomic_u32 *val,
|
|
760
688
|
*val = desired;
|
761
689
|
}
|
762
690
|
|
763
|
-
#else
|
764
|
-
|
765
|
-
// Require some atomics implementation. Contact BoringSSL maintainers if you
|
766
|
-
// have a platform with fails this check.
|
767
|
-
#error "Thread-compatible configurations require atomics"
|
768
|
-
|
769
691
|
#endif
|
770
692
|
|
771
693
|
// See the comment in the |__cplusplus| section above.
|
@@ -803,7 +725,8 @@ OPENSSL_EXPORT int CRYPTO_refcount_dec_and_test_zero(CRYPTO_refcount_t *count);
|
|
803
725
|
typedef struct crypto_mutex_st {
|
804
726
|
char padding; // Empty structs have different sizes in C and C++.
|
805
727
|
} CRYPTO_MUTEX;
|
806
|
-
#define CRYPTO_MUTEX_INIT
|
728
|
+
#define CRYPTO_MUTEX_INIT \
|
729
|
+
{ 0 }
|
807
730
|
#elif defined(OPENSSL_WINDOWS_THREADS)
|
808
731
|
typedef SRWLOCK CRYPTO_MUTEX;
|
809
732
|
#define CRYPTO_MUTEX_INIT SRWLOCK_INIT
|
@@ -868,7 +791,7 @@ using MutexReadLock =
|
|
868
791
|
|
869
792
|
BSSL_NAMESPACE_END
|
870
793
|
|
871
|
-
}
|
794
|
+
} // extern "C++"
|
872
795
|
#endif // defined(__cplusplus)
|
873
796
|
|
874
797
|
|
@@ -932,9 +855,10 @@ typedef struct {
|
|
932
855
|
uint8_t num_reserved;
|
933
856
|
} CRYPTO_EX_DATA_CLASS;
|
934
857
|
|
935
|
-
#define CRYPTO_EX_DATA_CLASS_INIT
|
858
|
+
#define CRYPTO_EX_DATA_CLASS_INIT \
|
859
|
+
{ CRYPTO_MUTEX_INIT, NULL, NULL, {}, 0 }
|
936
860
|
#define CRYPTO_EX_DATA_CLASS_INIT_WITH_APP_DATA \
|
937
|
-
|
861
|
+
{ CRYPTO_MUTEX_INIT, NULL, NULL, {}, 1 }
|
938
862
|
|
939
863
|
// CRYPTO_get_ex_new_index_ex allocates a new index for |ex_data_class|. Each
|
940
864
|
// class of object should provide a wrapper function that uses the correct
|
@@ -980,21 +904,13 @@ OPENSSL_MSVC_PRAGMA(warning(push, 3))
|
|
980
904
|
#include <stdlib.h>
|
981
905
|
OPENSSL_MSVC_PRAGMA(warning(pop))
|
982
906
|
#pragma intrinsic(_byteswap_uint64, _byteswap_ulong, _byteswap_ushort)
|
983
|
-
static inline uint16_t CRYPTO_bswap2(uint16_t x) {
|
984
|
-
return _byteswap_ushort(x);
|
985
|
-
}
|
907
|
+
static inline uint16_t CRYPTO_bswap2(uint16_t x) { return _byteswap_ushort(x); }
|
986
908
|
|
987
|
-
static inline uint32_t CRYPTO_bswap4(uint32_t x) {
|
988
|
-
return _byteswap_ulong(x);
|
989
|
-
}
|
909
|
+
static inline uint32_t CRYPTO_bswap4(uint32_t x) { return _byteswap_ulong(x); }
|
990
910
|
|
991
|
-
static inline uint64_t CRYPTO_bswap8(uint64_t x) {
|
992
|
-
return _byteswap_uint64(x);
|
993
|
-
}
|
911
|
+
static inline uint64_t CRYPTO_bswap8(uint64_t x) { return _byteswap_uint64(x); }
|
994
912
|
#else
|
995
|
-
static inline uint16_t CRYPTO_bswap2(uint16_t x) {
|
996
|
-
return (x >> 8) | (x << 8);
|
997
|
-
}
|
913
|
+
static inline uint16_t CRYPTO_bswap2(uint16_t x) { return (x >> 8) | (x << 8); }
|
998
914
|
|
999
915
|
static inline uint32_t CRYPTO_bswap4(uint32_t x) {
|
1000
916
|
x = (x >> 16) | (x << 16);
|
@@ -1041,7 +957,7 @@ static inline void *OPENSSL_memchr(void *s, int c, size_t n) {
|
|
1041
957
|
return memchr(s, c, n);
|
1042
958
|
}
|
1043
959
|
|
1044
|
-
}
|
960
|
+
} // extern "C++"
|
1045
961
|
#else // __cplusplus
|
1046
962
|
|
1047
963
|
static inline void *OPENSSL_memchr(const void *s, int c, size_t n) {
|
@@ -1093,6 +1009,17 @@ static inline void *OPENSSL_memset(void *dst, int c, size_t n) {
|
|
1093
1009
|
// endianness. They use |memcpy|, and so avoid alignment or strict aliasing
|
1094
1010
|
// requirements on the input and output pointers.
|
1095
1011
|
|
1012
|
+
static inline uint16_t CRYPTO_load_u16_be(const void *in) {
|
1013
|
+
uint16_t v;
|
1014
|
+
OPENSSL_memcpy(&v, in, sizeof(v));
|
1015
|
+
return CRYPTO_bswap2(v);
|
1016
|
+
}
|
1017
|
+
|
1018
|
+
static inline void CRYPTO_store_u16_be(void *out, uint16_t v) {
|
1019
|
+
v = CRYPTO_bswap2(v);
|
1020
|
+
OPENSSL_memcpy(out, &v, sizeof(v));
|
1021
|
+
}
|
1022
|
+
|
1096
1023
|
static inline uint32_t CRYPTO_load_u32_le(const void *in) {
|
1097
1024
|
uint32_t v;
|
1098
1025
|
OPENSSL_memcpy(&v, in, sizeof(v));
|
@@ -1197,117 +1124,6 @@ static inline uint64_t CRYPTO_rotr_u64(uint64_t value, int shift) {
|
|
1197
1124
|
}
|
1198
1125
|
|
1199
1126
|
|
1200
|
-
// Arithmetic functions.
|
1201
|
-
|
1202
|
-
// The most efficient versions of these functions on GCC and Clang depend on C11
|
1203
|
-
// |_Generic|. If we ever need to call these from C++, we'll need to add a
|
1204
|
-
// variant that uses C++ overloads instead.
|
1205
|
-
#if !defined(__cplusplus)
|
1206
|
-
|
1207
|
-
// CRYPTO_addc_* returns |x + y + carry|, and sets |*out_carry| to the carry
|
1208
|
-
// bit. |carry| must be zero or one.
|
1209
|
-
#if OPENSSL_HAS_BUILTIN(__builtin_addc)
|
1210
|
-
|
1211
|
-
#define CRYPTO_GENERIC_ADDC(x, y, carry, out_carry) \
|
1212
|
-
(_Generic((x), \
|
1213
|
-
unsigned: __builtin_addc, \
|
1214
|
-
unsigned long: __builtin_addcl, \
|
1215
|
-
unsigned long long: __builtin_addcll))((x), (y), (carry), (out_carry))
|
1216
|
-
|
1217
|
-
static inline uint32_t CRYPTO_addc_u32(uint32_t x, uint32_t y, uint32_t carry,
|
1218
|
-
uint32_t *out_carry) {
|
1219
|
-
declassify_assert(carry <= 1);
|
1220
|
-
return CRYPTO_GENERIC_ADDC(x, y, carry, out_carry);
|
1221
|
-
}
|
1222
|
-
|
1223
|
-
static inline uint64_t CRYPTO_addc_u64(uint64_t x, uint64_t y, uint64_t carry,
|
1224
|
-
uint64_t *out_carry) {
|
1225
|
-
declassify_assert(carry <= 1);
|
1226
|
-
return CRYPTO_GENERIC_ADDC(x, y, carry, out_carry);
|
1227
|
-
}
|
1228
|
-
|
1229
|
-
#else
|
1230
|
-
|
1231
|
-
static inline uint32_t CRYPTO_addc_u32(uint32_t x, uint32_t y, uint32_t carry,
|
1232
|
-
uint32_t *out_carry) {
|
1233
|
-
declassify_assert(carry <= 1);
|
1234
|
-
uint64_t ret = carry;
|
1235
|
-
ret += (uint64_t)x + y;
|
1236
|
-
*out_carry = (uint32_t)(ret >> 32);
|
1237
|
-
return (uint32_t)ret;
|
1238
|
-
}
|
1239
|
-
|
1240
|
-
static inline uint64_t CRYPTO_addc_u64(uint64_t x, uint64_t y, uint64_t carry,
|
1241
|
-
uint64_t *out_carry) {
|
1242
|
-
declassify_assert(carry <= 1);
|
1243
|
-
#if defined(BORINGSSL_HAS_UINT128)
|
1244
|
-
uint128_t ret = carry;
|
1245
|
-
ret += (uint128_t)x + y;
|
1246
|
-
*out_carry = (uint64_t)(ret >> 64);
|
1247
|
-
return (uint64_t)ret;
|
1248
|
-
#else
|
1249
|
-
x += carry;
|
1250
|
-
carry = x < carry;
|
1251
|
-
uint64_t ret = x + y;
|
1252
|
-
carry += ret < x;
|
1253
|
-
*out_carry = carry;
|
1254
|
-
return ret;
|
1255
|
-
#endif
|
1256
|
-
}
|
1257
|
-
#endif
|
1258
|
-
|
1259
|
-
// CRYPTO_subc_* returns |x - y - borrow|, and sets |*out_borrow| to the borrow
|
1260
|
-
// bit. |borrow| must be zero or one.
|
1261
|
-
#if OPENSSL_HAS_BUILTIN(__builtin_subc)
|
1262
|
-
|
1263
|
-
#define CRYPTO_GENERIC_SUBC(x, y, borrow, out_borrow) \
|
1264
|
-
(_Generic((x), \
|
1265
|
-
unsigned: __builtin_subc, \
|
1266
|
-
unsigned long: __builtin_subcl, \
|
1267
|
-
unsigned long long: __builtin_subcll))((x), (y), (borrow), (out_borrow))
|
1268
|
-
|
1269
|
-
static inline uint32_t CRYPTO_subc_u32(uint32_t x, uint32_t y, uint32_t borrow,
|
1270
|
-
uint32_t *out_borrow) {
|
1271
|
-
declassify_assert(borrow <= 1);
|
1272
|
-
return CRYPTO_GENERIC_SUBC(x, y, borrow, out_borrow);
|
1273
|
-
}
|
1274
|
-
|
1275
|
-
static inline uint64_t CRYPTO_subc_u64(uint64_t x, uint64_t y, uint64_t borrow,
|
1276
|
-
uint64_t *out_borrow) {
|
1277
|
-
declassify_assert(borrow <= 1);
|
1278
|
-
return CRYPTO_GENERIC_SUBC(x, y, borrow, out_borrow);
|
1279
|
-
}
|
1280
|
-
|
1281
|
-
#else
|
1282
|
-
|
1283
|
-
static inline uint32_t CRYPTO_subc_u32(uint32_t x, uint32_t y, uint32_t borrow,
|
1284
|
-
uint32_t *out_borrow) {
|
1285
|
-
declassify_assert(borrow <= 1);
|
1286
|
-
uint32_t ret = x - y - borrow;
|
1287
|
-
*out_borrow = (x < y) | ((x == y) & borrow);
|
1288
|
-
return ret;
|
1289
|
-
}
|
1290
|
-
|
1291
|
-
static inline uint64_t CRYPTO_subc_u64(uint64_t x, uint64_t y, uint64_t borrow,
|
1292
|
-
uint64_t *out_borrow) {
|
1293
|
-
declassify_assert(borrow <= 1);
|
1294
|
-
uint64_t ret = x - y - borrow;
|
1295
|
-
*out_borrow = (x < y) | ((x == y) & borrow);
|
1296
|
-
return ret;
|
1297
|
-
}
|
1298
|
-
#endif
|
1299
|
-
|
1300
|
-
#if defined(OPENSSL_64_BIT)
|
1301
|
-
#define CRYPTO_addc_w CRYPTO_addc_u64
|
1302
|
-
#define CRYPTO_subc_w CRYPTO_subc_u64
|
1303
|
-
#else
|
1304
|
-
#define CRYPTO_addc_w CRYPTO_addc_u32
|
1305
|
-
#define CRYPTO_subc_w CRYPTO_subc_u32
|
1306
|
-
#endif
|
1307
|
-
|
1308
|
-
#endif // !__cplusplus
|
1309
|
-
|
1310
|
-
|
1311
1127
|
// FIPS functions.
|
1312
1128
|
|
1313
1129
|
#if defined(BORINGSSL_FIPS)
|
@@ -1368,9 +1184,7 @@ OPENSSL_INLINE int boringssl_fips_break_test(const char *test) {
|
|
1368
1184
|
return value != NULL && strcmp(value, test) == 0;
|
1369
1185
|
}
|
1370
1186
|
#else
|
1371
|
-
OPENSSL_INLINE int boringssl_fips_break_test(const char *test) {
|
1372
|
-
return 0;
|
1373
|
-
}
|
1187
|
+
OPENSSL_INLINE int boringssl_fips_break_test(const char *test) { return 0; }
|
1374
1188
|
#endif // BORINGSSL_FIPS_BREAK_TESTS
|
1375
1189
|
|
1376
1190
|
|
@@ -1723,7 +1537,9 @@ OPENSSL_INLINE int CRYPTO_is_ARMv8_SHA512_capable(void) {
|
|
1723
1537
|
// 3: aes_hw_set_encrypt_key
|
1724
1538
|
// 4: vpaes_encrypt
|
1725
1539
|
// 5: vpaes_set_encrypt_key
|
1726
|
-
|
1540
|
+
// 6: aes_gcm_enc_update_vaes_avx10_256
|
1541
|
+
// 7: aes_gcm_enc_update_vaes_avx10_512
|
1542
|
+
extern uint8_t BORINGSSL_function_hit[8];
|
1727
1543
|
#endif // BORINGSSL_DISPATCH_TEST
|
1728
1544
|
|
1729
1545
|
// OPENSSL_vasprintf_internal is just like |vasprintf(3)|. If |system_malloc| is
|
@@ -1738,4 +1554,131 @@ OPENSSL_EXPORT int OPENSSL_vasprintf_internal(char **str, const char *format,
|
|
1738
1554
|
} // extern C
|
1739
1555
|
#endif
|
1740
1556
|
|
1557
|
+
// Arithmetic functions.
|
1558
|
+
|
1559
|
+
// CRYPTO_addc_* returns |x + y + carry|, and sets |*out_carry| to the carry
|
1560
|
+
// bit. |carry| must be zero or one.
|
1561
|
+
#if OPENSSL_HAS_BUILTIN(__builtin_addc)
|
1562
|
+
|
1563
|
+
inline unsigned int CRYPTO_addc_impl(unsigned int x, unsigned int y,
|
1564
|
+
unsigned int carry,
|
1565
|
+
unsigned int *out_carry) {
|
1566
|
+
return __builtin_addc(x, y, carry, out_carry);
|
1567
|
+
}
|
1568
|
+
|
1569
|
+
inline unsigned long CRYPTO_addc_impl(unsigned long x, unsigned long y,
|
1570
|
+
unsigned long carry,
|
1571
|
+
unsigned long *out_carry) {
|
1572
|
+
return __builtin_addcl(x, y, carry, out_carry);
|
1573
|
+
}
|
1574
|
+
|
1575
|
+
inline unsigned long long CRYPTO_addc_impl(unsigned long long x,
|
1576
|
+
unsigned long long y,
|
1577
|
+
unsigned long long carry,
|
1578
|
+
unsigned long long *out_carry) {
|
1579
|
+
return __builtin_addcll(x, y, carry, out_carry);
|
1580
|
+
}
|
1581
|
+
|
1582
|
+
inline uint32_t CRYPTO_addc_u32(uint32_t x, uint32_t y, uint32_t carry,
|
1583
|
+
uint32_t *out_carry) {
|
1584
|
+
return CRYPTO_addc_impl(x, y, carry, out_carry);
|
1585
|
+
}
|
1586
|
+
|
1587
|
+
inline uint64_t CRYPTO_addc_u64(uint64_t x, uint64_t y, uint64_t carry,
|
1588
|
+
uint64_t *out_carry) {
|
1589
|
+
return CRYPTO_addc_impl(x, y, carry, out_carry);
|
1590
|
+
}
|
1591
|
+
|
1592
|
+
#else
|
1593
|
+
|
1594
|
+
static inline uint32_t CRYPTO_addc_u32(uint32_t x, uint32_t y, uint32_t carry,
|
1595
|
+
uint32_t *out_carry) {
|
1596
|
+
declassify_assert(carry <= 1);
|
1597
|
+
uint64_t ret = carry;
|
1598
|
+
ret += (uint64_t)x + y;
|
1599
|
+
*out_carry = (uint32_t)(ret >> 32);
|
1600
|
+
return (uint32_t)ret;
|
1601
|
+
}
|
1602
|
+
|
1603
|
+
static inline uint64_t CRYPTO_addc_u64(uint64_t x, uint64_t y, uint64_t carry,
|
1604
|
+
uint64_t *out_carry) {
|
1605
|
+
declassify_assert(carry <= 1);
|
1606
|
+
#if defined(BORINGSSL_HAS_UINT128)
|
1607
|
+
uint128_t ret = carry;
|
1608
|
+
ret += (uint128_t)x + y;
|
1609
|
+
*out_carry = (uint64_t)(ret >> 64);
|
1610
|
+
return (uint64_t)ret;
|
1611
|
+
#else
|
1612
|
+
x += carry;
|
1613
|
+
carry = x < carry;
|
1614
|
+
uint64_t ret = x + y;
|
1615
|
+
carry += ret < x;
|
1616
|
+
*out_carry = carry;
|
1617
|
+
return ret;
|
1618
|
+
#endif
|
1619
|
+
}
|
1620
|
+
#endif
|
1621
|
+
|
1622
|
+
|
1623
|
+
// CRYPTO_subc_* returns |x - y - borrow|, and sets |*out_borrow| to the borrow
|
1624
|
+
// bit. |borrow| must be zero or one.
|
1625
|
+
#if OPENSSL_HAS_BUILTIN(__builtin_subc)
|
1626
|
+
|
1627
|
+
inline unsigned int CRYPTO_subc_impl(unsigned int x, unsigned int y,
|
1628
|
+
unsigned int borrow,
|
1629
|
+
unsigned int *out_borrow) {
|
1630
|
+
return __builtin_subc(x, y, borrow, out_borrow);
|
1631
|
+
}
|
1632
|
+
|
1633
|
+
inline unsigned long CRYPTO_subc_impl(unsigned long x, unsigned long y,
|
1634
|
+
unsigned long borrow,
|
1635
|
+
unsigned long *out_borrow) {
|
1636
|
+
return __builtin_subcl(x, y, borrow, out_borrow);
|
1637
|
+
}
|
1638
|
+
|
1639
|
+
inline unsigned long long CRYPTO_subc_impl(unsigned long long x,
|
1640
|
+
unsigned long long y,
|
1641
|
+
unsigned long long borrow,
|
1642
|
+
unsigned long long *out_borrow) {
|
1643
|
+
return __builtin_subcll(x, y, borrow, out_borrow);
|
1644
|
+
}
|
1645
|
+
|
1646
|
+
inline uint32_t CRYPTO_subc_u32(uint32_t x, uint32_t y, uint32_t borrow,
|
1647
|
+
uint32_t *out_borrow) {
|
1648
|
+
return CRYPTO_subc_impl(x, y, borrow, out_borrow);
|
1649
|
+
}
|
1650
|
+
|
1651
|
+
inline uint64_t CRYPTO_subc_u64(uint64_t x, uint64_t y, uint64_t borrow,
|
1652
|
+
uint64_t *out_borrow) {
|
1653
|
+
return CRYPTO_subc_impl(x, y, borrow, out_borrow);
|
1654
|
+
}
|
1655
|
+
|
1656
|
+
#else
|
1657
|
+
|
1658
|
+
static inline uint32_t CRYPTO_subc_u32(uint32_t x, uint32_t y, uint32_t borrow,
|
1659
|
+
uint32_t *out_borrow) {
|
1660
|
+
declassify_assert(borrow <= 1);
|
1661
|
+
uint32_t ret = x - y - borrow;
|
1662
|
+
*out_borrow = (x < y) | ((x == y) & borrow);
|
1663
|
+
return ret;
|
1664
|
+
}
|
1665
|
+
|
1666
|
+
static inline uint64_t CRYPTO_subc_u64(uint64_t x, uint64_t y, uint64_t borrow,
|
1667
|
+
uint64_t *out_borrow) {
|
1668
|
+
declassify_assert(borrow <= 1);
|
1669
|
+
uint64_t ret = x - y - borrow;
|
1670
|
+
*out_borrow = (x < y) | ((x == y) & borrow);
|
1671
|
+
return ret;
|
1672
|
+
}
|
1673
|
+
#endif
|
1674
|
+
|
1675
|
+
#if defined(OPENSSL_64_BIT)
|
1676
|
+
#define CRYPTO_addc_w CRYPTO_addc_u64
|
1677
|
+
#define CRYPTO_subc_w CRYPTO_subc_u64
|
1678
|
+
#else
|
1679
|
+
#define CRYPTO_addc_w CRYPTO_addc_u32
|
1680
|
+
#define CRYPTO_subc_w CRYPTO_subc_u32
|
1681
|
+
#endif
|
1682
|
+
|
1683
|
+
|
1741
1684
|
#endif // OPENSSL_HEADER_CRYPTO_INTERNAL_H
|
@@ -62,8 +62,8 @@
|
|
62
62
|
|
63
63
|
#include <openssl/mem.h>
|
64
64
|
|
65
|
-
#include "internal.h"
|
66
65
|
#include "../internal.h"
|
66
|
+
#include "internal.h"
|
67
67
|
|
68
68
|
|
69
69
|
// kMinNumBuckets is the minimum size of the buckets array in an |_LHASH|.
|
@@ -104,13 +104,14 @@ struct lhash_st {
|
|
104
104
|
};
|
105
105
|
|
106
106
|
_LHASH *OPENSSL_lh_new(lhash_hash_func hash, lhash_cmp_func comp) {
|
107
|
-
_LHASH *ret = OPENSSL_zalloc(sizeof(_LHASH));
|
107
|
+
_LHASH *ret = reinterpret_cast<_LHASH *>(OPENSSL_zalloc(sizeof(_LHASH)));
|
108
108
|
if (ret == NULL) {
|
109
109
|
return NULL;
|
110
110
|
}
|
111
111
|
|
112
112
|
ret->num_buckets = kMinNumBuckets;
|
113
|
-
ret->buckets =
|
113
|
+
ret->buckets = reinterpret_cast<LHASH_ITEM **>(
|
114
|
+
OPENSSL_calloc(ret->num_buckets, sizeof(LHASH_ITEM *)));
|
114
115
|
if (ret->buckets == NULL) {
|
115
116
|
OPENSSL_free(ret);
|
116
117
|
return NULL;
|
@@ -208,11 +209,11 @@ static void lh_rebucket(_LHASH *lh, const size_t new_num_buckets) {
|
|
208
209
|
size_t i, alloc_size;
|
209
210
|
|
210
211
|
alloc_size = sizeof(LHASH_ITEM *) * new_num_buckets;
|
211
|
-
if (alloc_size / sizeof(LHASH_ITEM*) != new_num_buckets) {
|
212
|
+
if (alloc_size / sizeof(LHASH_ITEM *) != new_num_buckets) {
|
212
213
|
return;
|
213
214
|
}
|
214
215
|
|
215
|
-
new_buckets = OPENSSL_zalloc(alloc_size);
|
216
|
+
new_buckets = reinterpret_cast<LHASH_ITEM **>(OPENSSL_zalloc(alloc_size));
|
216
217
|
if (new_buckets == NULL) {
|
217
218
|
return;
|
218
219
|
}
|
@@ -282,7 +283,7 @@ int OPENSSL_lh_insert(_LHASH *lh, void **old_data, void *data,
|
|
282
283
|
}
|
283
284
|
|
284
285
|
// An element equal to |data| doesn't exist in the hash table yet.
|
285
|
-
item = OPENSSL_malloc(sizeof(LHASH_ITEM));
|
286
|
+
item = reinterpret_cast<LHASH_ITEM *>(OPENSSL_malloc(sizeof(LHASH_ITEM)));
|
286
287
|
if (item == NULL) {
|
287
288
|
return 0;
|
288
289
|
}
|
@@ -312,7 +313,7 @@ void *OPENSSL_lh_delete(_LHASH *lh, const void *data,
|
|
312
313
|
|
313
314
|
item = *next_ptr;
|
314
315
|
*next_ptr = item->next;
|
315
|
-
ret = item->data;
|
316
|
+
ret = reinterpret_cast<LHASH_ITEM *>(item->data);
|
316
317
|
OPENSSL_free(item);
|
317
318
|
|
318
319
|
lh->num_items--;
|