grpc 1.27.0 → 1.28.0.pre2

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of grpc might be problematic. Click here for more details.

Files changed (678) hide show
  1. checksums.yaml +4 -4
  2. data/Makefile +707 -629
  3. data/include/grpc/impl/codegen/grpc_types.h +5 -0
  4. data/include/grpc/impl/codegen/port_platform.h +7 -0
  5. data/include/grpc/impl/codegen/sync.h +5 -3
  6. data/include/grpc/impl/codegen/sync_abseil.h +36 -0
  7. data/include/grpc/module.modulemap +3 -0
  8. data/include/grpc/support/sync_abseil.h +26 -0
  9. data/src/core/ext/filters/client_channel/client_channel.cc +47 -29
  10. data/src/core/ext/filters/client_channel/client_channel_channelz.cc +31 -47
  11. data/src/core/ext/filters/client_channel/client_channel_channelz.h +1 -3
  12. data/src/core/ext/filters/client_channel/http_connect_handshaker.cc +1 -1
  13. data/src/core/ext/filters/client_channel/http_proxy.cc +4 -1
  14. data/src/core/ext/filters/client_channel/lb_policy/grpclb/grpclb.cc +21 -28
  15. data/src/core/ext/filters/client_channel/lb_policy/pick_first/pick_first.cc +18 -21
  16. data/src/core/ext/filters/client_channel/lb_policy/round_robin/round_robin.cc +9 -13
  17. data/src/core/ext/filters/client_channel/lb_policy/xds/cds.cc +46 -72
  18. data/src/core/ext/filters/client_channel/lb_policy/xds/xds.cc +413 -422
  19. data/src/core/ext/filters/client_channel/lb_policy_factory.h +3 -3
  20. data/src/core/ext/filters/client_channel/lb_policy_registry.cc +43 -75
  21. data/src/core/ext/filters/client_channel/lb_policy_registry.h +1 -1
  22. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc +57 -70
  23. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_libuv.cc +1 -1
  24. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_posix.cc +1 -1
  25. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_ev_driver_windows.cc +1 -1
  26. data/src/core/ext/filters/client_channel/resolver/dns/c_ares/grpc_ares_wrapper.cc +3 -3
  27. data/src/core/ext/filters/client_channel/resolver/dns/native/dns_resolver.cc +2 -2
  28. data/src/core/ext/filters/client_channel/resolver/fake/fake_resolver.cc +1 -1
  29. data/src/core/ext/filters/client_channel/resolver/sockaddr/sockaddr_resolver.cc +3 -3
  30. data/src/core/ext/filters/client_channel/resolver/xds/xds_resolver.cc +4 -2
  31. data/src/core/ext/filters/client_channel/resolver_result_parsing.cc +228 -286
  32. data/src/core/ext/filters/client_channel/resolver_result_parsing.h +2 -2
  33. data/src/core/ext/filters/client_channel/resolving_lb_policy.cc +13 -14
  34. data/src/core/ext/filters/client_channel/resolving_lb_policy.h +5 -7
  35. data/src/core/ext/filters/client_channel/service_config.cc +91 -160
  36. data/src/core/ext/filters/client_channel/service_config.h +14 -21
  37. data/src/core/ext/filters/client_channel/xds/xds_api.cc +581 -251
  38. data/src/core/ext/filters/client_channel/xds/xds_api.h +189 -151
  39. data/src/core/ext/filters/client_channel/xds/xds_bootstrap.cc +133 -350
  40. data/src/core/ext/filters/client_channel/xds/xds_bootstrap.h +18 -39
  41. data/src/core/ext/filters/client_channel/xds/xds_channel.h +3 -1
  42. data/src/core/ext/filters/client_channel/xds/xds_channel_secure.cc +12 -9
  43. data/src/core/ext/filters/client_channel/xds/xds_client.cc +559 -242
  44. data/src/core/ext/filters/client_channel/xds/xds_client.h +54 -34
  45. data/src/core/ext/filters/client_channel/xds/xds_client_stats.cc +53 -128
  46. data/src/core/ext/filters/client_channel/xds/xds_client_stats.h +105 -132
  47. data/src/core/ext/filters/message_size/message_size_filter.cc +32 -35
  48. data/src/core/ext/filters/message_size/message_size_filter.h +1 -1
  49. data/src/core/ext/transport/chttp2/server/chttp2_server.cc +3 -6
  50. data/src/core/ext/transport/chttp2/transport/chttp2_transport.cc +4 -6
  51. data/src/core/ext/transport/chttp2/transport/writing.cc +1 -1
  52. data/src/core/ext/transport/inproc/inproc_transport.cc +22 -42
  53. data/src/core/ext/upb-generated/envoy/annotations/deprecation.upb.c +17 -0
  54. data/src/core/ext/upb-generated/envoy/annotations/deprecation.upb.h +30 -0
  55. data/src/core/ext/upb-generated/envoy/annotations/resource.upb.c +27 -0
  56. data/src/core/ext/upb-generated/envoy/annotations/resource.upb.h +54 -0
  57. data/src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.c +46 -21
  58. data/src/core/ext/upb-generated/envoy/api/v2/auth/cert.upb.h +116 -29
  59. data/src/core/ext/upb-generated/envoy/api/v2/cds.upb.c +4 -362
  60. data/src/core/ext/upb-generated/envoy/api/v2/cds.upb.h +14 -1337
  61. data/src/core/ext/upb-generated/envoy/api/v2/cluster.upb.c +390 -0
  62. data/src/core/ext/upb-generated/envoy/api/v2/cluster.upb.h +1411 -0
  63. data/src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.c +29 -8
  64. data/src/core/ext/upb-generated/envoy/api/v2/cluster/circuit_breaker.upb.h +60 -0
  65. data/src/core/ext/upb-generated/envoy/api/v2/cluster/filter.upb.c +1 -0
  66. data/src/core/ext/upb-generated/envoy/api/v2/cluster/outlier_detection.upb.c +1 -0
  67. data/src/core/ext/upb-generated/envoy/api/v2/core/address.upb.c +5 -3
  68. data/src/core/ext/upb-generated/envoy/api/v2/core/address.upb.h +6 -2
  69. data/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.c +48 -5
  70. data/src/core/ext/upb-generated/envoy/api/v2/core/base.upb.h +154 -4
  71. data/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.c +19 -15
  72. data/src/core/ext/upb-generated/envoy/api/v2/core/config_source.upb.h +46 -32
  73. data/src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.c +26 -4
  74. data/src/core/ext/upb-generated/envoy/api/v2/core/grpc_service.upb.h +70 -0
  75. data/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.c +42 -25
  76. data/src/core/ext/upb-generated/envoy/api/v2/core/health_check.upb.h +83 -25
  77. data/src/core/ext/upb-generated/envoy/api/v2/core/http_uri.upb.c +1 -0
  78. data/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.c +43 -7
  79. data/src/core/ext/upb-generated/envoy/api/v2/core/protocol.upb.h +115 -0
  80. data/src/core/ext/upb-generated/envoy/api/v2/discovery.upb.c +1 -0
  81. data/src/core/ext/upb-generated/envoy/api/v2/eds.upb.c +7 -68
  82. data/src/core/ext/upb-generated/envoy/api/v2/eds.upb.h +14 -201
  83. data/src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.c +91 -0
  84. data/src/core/ext/upb-generated/envoy/api/v2/endpoint.upb.h +240 -0
  85. data/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.c +1 -71
  86. data/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint.upb.h +3 -228
  87. data/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.c +88 -0
  88. data/src/core/ext/upb-generated/envoy/api/v2/endpoint/endpoint_components.upb.h +258 -0
  89. data/src/core/ext/upb-generated/envoy/api/v2/endpoint/load_report.upb.c +1 -0
  90. data/src/core/ext/upb-generated/envoy/api/v2/lds.upb.c +30 -0
  91. data/src/core/ext/upb-generated/envoy/api/v2/lds.upb.h +53 -0
  92. data/src/core/ext/upb-generated/envoy/api/v2/listener.upb.c +104 -0
  93. data/src/core/ext/upb-generated/envoy/api/v2/listener.upb.h +383 -0
  94. data/src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.c +17 -0
  95. data/src/core/ext/upb-generated/envoy/api/v2/listener/listener.upb.h +33 -0
  96. data/src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.c +144 -0
  97. data/src/core/ext/upb-generated/envoy/api/v2/listener/listener_components.upb.h +527 -0
  98. data/src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.c +42 -0
  99. data/src/core/ext/upb-generated/envoy/api/v2/listener/udp_listener_config.upb.h +112 -0
  100. data/src/core/ext/upb-generated/envoy/api/v2/rds.upb.c +29 -0
  101. data/src/core/ext/upb-generated/envoy/api/v2/rds.upb.h +53 -0
  102. data/src/core/ext/upb-generated/envoy/api/v2/route.upb.c +62 -0
  103. data/src/core/ext/upb-generated/envoy/api/v2/route.upb.h +199 -0
  104. data/src/core/ext/upb-generated/envoy/api/v2/route/route.upb.c +17 -0
  105. data/src/core/ext/upb-generated/envoy/api/v2/route/route.upb.h +33 -0
  106. data/src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.c +793 -0
  107. data/src/core/ext/upb-generated/envoy/api/v2/route/route_components.upb.h +2936 -0
  108. data/src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.c +58 -0
  109. data/src/core/ext/upb-generated/envoy/api/v2/scoped_route.upb.h +134 -0
  110. data/src/core/ext/upb-generated/envoy/api/v2/srds.upb.c +27 -0
  111. data/src/core/ext/upb-generated/envoy/api/v2/srds.upb.h +53 -0
  112. data/src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.c +227 -0
  113. data/src/core/ext/upb-generated/envoy/config/filter/accesslog/v2/accesslog.upb.h +725 -0
  114. data/src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.c +296 -0
  115. data/src/core/ext/upb-generated/envoy/config/filter/network/http_connection_manager/v2/http_connection_manager.upb.h +1072 -0
  116. data/src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.c +32 -0
  117. data/src/core/ext/upb-generated/envoy/config/listener/v2/api_listener.upb.h +65 -0
  118. data/src/core/ext/upb-generated/envoy/type/matcher/regex.upb.c +47 -0
  119. data/src/core/ext/upb-generated/envoy/type/matcher/regex.upb.h +108 -0
  120. data/src/core/ext/upb-generated/envoy/type/matcher/string.upb.c +52 -0
  121. data/src/core/ext/upb-generated/envoy/type/matcher/string.upb.h +133 -0
  122. data/src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.c +87 -0
  123. data/src/core/ext/upb-generated/envoy/type/metadata/v2/metadata.upb.h +258 -0
  124. data/src/core/ext/upb-generated/envoy/type/range.upb.c +11 -0
  125. data/src/core/ext/upb-generated/envoy/type/range.upb.h +27 -0
  126. data/src/core/ext/upb-generated/envoy/type/semantic_version.upb.c +28 -0
  127. data/src/core/ext/upb-generated/envoy/type/semantic_version.upb.h +62 -0
  128. data/src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.c +88 -0
  129. data/src/core/ext/upb-generated/envoy/type/tracing/v2/custom_tag.upb.h +249 -0
  130. data/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.c +30 -27
  131. data/src/core/ext/upb-generated/src/proto/grpc/gcp/handshaker.upb.h +64 -52
  132. data/src/core/ext/upb-generated/udpa/annotations/migrate.upb.c +48 -0
  133. data/src/core/ext/upb-generated/udpa/annotations/migrate.upb.h +104 -0
  134. data/src/core/ext/upb-generated/udpa/annotations/sensitive.upb.c +17 -0
  135. data/src/core/ext/upb-generated/udpa/annotations/sensitive.upb.h +30 -0
  136. data/src/core/ext/upb-generated/validate/validate.upb.c +38 -34
  137. data/src/core/ext/upb-generated/validate/validate.upb.h +129 -99
  138. data/src/core/lib/channel/channel_trace.cc +32 -41
  139. data/src/core/lib/channel/channel_trace.h +3 -3
  140. data/src/core/lib/channel/channelz.cc +158 -248
  141. data/src/core/lib/channel/channelz.h +12 -15
  142. data/src/core/lib/channel/channelz_registry.cc +47 -74
  143. data/src/core/lib/channel/channelz_registry.h +4 -4
  144. data/src/core/lib/gpr/sync_abseil.cc +114 -0
  145. data/src/core/lib/gpr/sync_posix.cc +8 -5
  146. data/src/core/lib/gpr/sync_windows.cc +4 -2
  147. data/src/core/lib/gprpp/host_port.cc +1 -1
  148. data/src/core/lib/gprpp/inlined_vector.h +1 -210
  149. data/src/core/lib/gprpp/memory.h +2 -6
  150. data/src/core/lib/gprpp/optional.h +0 -41
  151. data/src/core/lib/gprpp/string_view.h +5 -114
  152. data/src/core/lib/iomgr/buffer_list.cc +36 -35
  153. data/src/core/lib/iomgr/error.h +4 -4
  154. data/src/core/lib/iomgr/ev_epollex_linux.cc +12 -4
  155. data/src/core/lib/iomgr/load_file.cc +1 -0
  156. data/src/core/lib/iomgr/tcp_client_posix.cc +17 -17
  157. data/src/core/lib/iomgr/tcp_client_posix.h +6 -6
  158. data/src/core/lib/iomgr/tcp_posix.cc +2 -1
  159. data/src/core/lib/iomgr/work_serializer.cc +155 -0
  160. data/src/core/lib/iomgr/work_serializer.h +65 -0
  161. data/src/core/lib/json/json.h +209 -79
  162. data/src/core/lib/json/json_reader.cc +469 -455
  163. data/src/core/lib/json/json_writer.cc +173 -169
  164. data/src/core/lib/security/credentials/alts/check_gcp_environment.cc +1 -1
  165. data/src/core/lib/security/credentials/google_default/google_default_credentials.cc +10 -8
  166. data/src/core/lib/security/credentials/jwt/json_token.cc +26 -56
  167. data/src/core/lib/security/credentials/jwt/json_token.h +2 -1
  168. data/src/core/lib/security/credentials/jwt/jwt_credentials.cc +8 -18
  169. data/src/core/lib/security/credentials/jwt/jwt_verifier.cc +149 -159
  170. data/src/core/lib/security/credentials/jwt/jwt_verifier.h +2 -3
  171. data/src/core/lib/security/credentials/oauth2/oauth2_credentials.cc +37 -34
  172. data/src/core/lib/security/credentials/oauth2/oauth2_credentials.h +1 -1
  173. data/src/core/lib/security/credentials/tls/grpc_tls_credentials_options.h +2 -1
  174. data/src/core/lib/security/security_connector/local/local_security_connector.cc +5 -7
  175. data/src/core/lib/security/security_connector/ssl/ssl_security_connector.cc +3 -15
  176. data/src/core/lib/security/security_connector/ssl_utils.cc +3 -1
  177. data/src/core/lib/security/security_connector/ssl_utils.h +0 -1
  178. data/src/core/lib/security/security_connector/tls/tls_security_connector.cc +24 -1
  179. data/src/core/lib/security/security_connector/tls/tls_security_connector.h +5 -1
  180. data/src/core/lib/security/transport/security_handshaker.cc +2 -2
  181. data/src/core/lib/security/util/json_util.cc +22 -15
  182. data/src/core/lib/security/util/json_util.h +2 -2
  183. data/src/core/lib/surface/version.cc +1 -1
  184. data/src/core/tsi/alts/handshaker/alts_handshaker_client.cc +1 -1
  185. data/src/core/tsi/alts/handshaker/alts_tsi_handshaker.cc +1 -1
  186. data/src/core/tsi/grpc_shadow_boringssl.h +1333 -1319
  187. data/src/core/tsi/ssl/session_cache/ssl_session_boringssl.cc +1 -1
  188. data/src/core/tsi/ssl/session_cache/ssl_session_openssl.cc +1 -1
  189. data/src/core/tsi/ssl_transport_security.cc +2 -1
  190. data/src/ruby/lib/grpc/version.rb +1 -1
  191. data/third_party/abseil-cpp/absl/base/attributes.h +1 -1
  192. data/third_party/abseil-cpp/absl/base/config.h +10 -4
  193. data/third_party/abseil-cpp/absl/base/internal/atomic_hook.h +30 -9
  194. data/third_party/abseil-cpp/absl/base/internal/errno_saver.h +43 -0
  195. data/third_party/abseil-cpp/absl/base/internal/raw_logging.cc +7 -5
  196. data/third_party/abseil-cpp/absl/base/internal/raw_logging.h +2 -1
  197. data/third_party/abseil-cpp/absl/base/internal/spinlock.cc +2 -2
  198. data/third_party/abseil-cpp/absl/base/internal/spinlock_linux.inc +2 -3
  199. data/third_party/abseil-cpp/absl/base/internal/spinlock_posix.inc +3 -3
  200. data/third_party/abseil-cpp/absl/base/internal/unscaledcycleclock.cc +37 -0
  201. data/third_party/abseil-cpp/absl/base/options.h +2 -10
  202. data/third_party/abseil-cpp/absl/strings/charconv.cc +0 -1
  203. data/third_party/abseil-cpp/absl/strings/internal/str_format/arg.cc +388 -0
  204. data/third_party/abseil-cpp/absl/strings/internal/str_format/arg.h +432 -0
  205. data/third_party/abseil-cpp/absl/strings/internal/str_format/bind.cc +245 -0
  206. data/third_party/abseil-cpp/absl/strings/internal/str_format/bind.h +209 -0
  207. data/third_party/abseil-cpp/absl/strings/internal/str_format/checker.h +326 -0
  208. data/third_party/abseil-cpp/absl/strings/internal/str_format/extension.cc +51 -0
  209. data/third_party/abseil-cpp/absl/strings/internal/str_format/extension.h +415 -0
  210. data/third_party/abseil-cpp/absl/strings/internal/str_format/float_conversion.cc +493 -0
  211. data/third_party/abseil-cpp/absl/strings/internal/str_format/float_conversion.h +23 -0
  212. data/third_party/abseil-cpp/absl/strings/internal/str_format/output.cc +72 -0
  213. data/third_party/abseil-cpp/absl/strings/internal/str_format/output.h +104 -0
  214. data/third_party/abseil-cpp/absl/strings/internal/str_format/parser.cc +334 -0
  215. data/third_party/abseil-cpp/absl/strings/internal/str_format/parser.h +333 -0
  216. data/third_party/abseil-cpp/absl/strings/str_format.h +537 -0
  217. data/third_party/abseil-cpp/absl/strings/string_view.h +19 -11
  218. data/{src/boringssl → third_party/boringssl-with-bazel}/err_data.c +0 -0
  219. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_bitstr.c +0 -0
  220. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_bool.c +0 -0
  221. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_d2i_fp.c +0 -0
  222. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_dup.c +0 -0
  223. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_enum.c +0 -0
  224. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_gentm.c +0 -0
  225. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_i2d_fp.c +0 -0
  226. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_int.c +0 -0
  227. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_mbstr.c +0 -0
  228. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_object.c +0 -0
  229. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_octet.c +0 -0
  230. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_print.c +0 -0
  231. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_strnid.c +0 -0
  232. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_time.c +3 -4
  233. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_type.c +0 -0
  234. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_utctm.c +0 -0
  235. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/a_utf8.c +0 -0
  236. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/asn1_lib.c +0 -0
  237. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/asn1_locl.h +0 -0
  238. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/asn1_par.c +0 -0
  239. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/asn_pack.c +0 -0
  240. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/f_enum.c +0 -0
  241. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/f_int.c +0 -0
  242. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/f_string.c +0 -0
  243. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/tasn_dec.c +0 -0
  244. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/tasn_enc.c +0 -0
  245. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/tasn_fre.c +0 -0
  246. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/tasn_new.c +0 -0
  247. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/tasn_typ.c +0 -0
  248. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/tasn_utl.c +0 -0
  249. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/asn1/time_support.c +0 -0
  250. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/base64/base64.c +0 -0
  251. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bio/bio.c +0 -0
  252. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bio/bio_mem.c +0 -0
  253. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bio/connect.c +3 -4
  254. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bio/fd.c +0 -1
  255. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bio/file.c +5 -6
  256. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bio/hexdump.c +0 -0
  257. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bio/internal.h +0 -0
  258. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bio/pair.c +0 -1
  259. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bio/printf.c +0 -0
  260. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bio/socket.c +0 -0
  261. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bio/socket_helper.c +0 -0
  262. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bn_extra/bn_asn1.c +0 -0
  263. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bn_extra/convert.c +0 -0
  264. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/buf/buf.c +10 -69
  265. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bytestring/asn1_compat.c +0 -0
  266. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bytestring/ber.c +0 -0
  267. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bytestring/cbb.c +41 -2
  268. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bytestring/cbs.c +60 -3
  269. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bytestring/internal.h +0 -0
  270. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/bytestring/unicode.c +0 -0
  271. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/chacha/chacha.c +0 -0
  272. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/chacha/internal.h +0 -0
  273. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cipher_extra/cipher_extra.c +0 -0
  274. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cipher_extra/derive_key.c +0 -0
  275. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cipher_extra/e_aesccm.c +0 -0
  276. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cipher_extra/e_aesctrhmac.c +0 -0
  277. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cipher_extra/e_aesgcmsiv.c +8 -0
  278. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cipher_extra/e_chacha20poly1305.c +0 -0
  279. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cipher_extra/e_null.c +0 -0
  280. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cipher_extra/e_rc2.c +0 -0
  281. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cipher_extra/e_rc4.c +0 -0
  282. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cipher_extra/e_tls.c +0 -0
  283. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cipher_extra/internal.h +0 -0
  284. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cipher_extra/tls_cbc.c +0 -0
  285. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cmac/cmac.c +0 -0
  286. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/conf/conf.c +0 -0
  287. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/conf/conf_def.h +0 -0
  288. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/conf/internal.h +0 -0
  289. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cpu-aarch64-fuchsia.c +0 -0
  290. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cpu-aarch64-linux.c +0 -0
  291. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cpu-arm-linux.c +0 -1
  292. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cpu-arm-linux.h +0 -0
  293. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cpu-arm.c +0 -0
  294. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cpu-intel.c +0 -0
  295. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/cpu-ppc64le.c +0 -0
  296. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/crypto.c +0 -0
  297. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/curve25519/spake25519.c +0 -0
  298. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/dh/check.c +3 -3
  299. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/dh/dh.c +1 -2
  300. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/dh/dh_asn1.c +0 -0
  301. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/dh/params.c +0 -0
  302. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/digest_extra/digest_extra.c +0 -0
  303. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/dsa/dsa.c +0 -0
  304. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/dsa/dsa_asn1.c +0 -0
  305. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/ec_extra/ec_asn1.c +0 -0
  306. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/ec_extra/ec_derive.c +2 -3
  307. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/ecdh_extra/ecdh_extra.c +0 -0
  308. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/ecdsa_extra/ecdsa_asn1.c +0 -0
  309. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/engine/engine.c +0 -0
  310. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/err/err.c +6 -6
  311. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/err/internal.h +0 -0
  312. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/digestsign.c +0 -0
  313. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/evp.c +0 -0
  314. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/evp_asn1.c +0 -0
  315. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/evp_ctx.c +0 -0
  316. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/internal.h +0 -0
  317. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/p_dsa_asn1.c +0 -0
  318. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/p_ec.c +0 -1
  319. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/p_ec_asn1.c +0 -0
  320. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/p_ed25519.c +0 -0
  321. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/p_ed25519_asn1.c +0 -0
  322. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/p_rsa.c +14 -2
  323. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/p_rsa_asn1.c +0 -0
  324. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/p_x25519.c +0 -0
  325. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/p_x25519_asn1.c +1 -2
  326. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/pbkdf.c +0 -0
  327. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/print.c +0 -0
  328. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/scrypt.c +0 -0
  329. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/evp/sign.c +0 -0
  330. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/ex_data.c +0 -0
  331. data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/aes.c +108 -0
  332. data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/aes/aes_nohw.c +1282 -0
  333. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/aes/internal.h +5 -7
  334. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/aes/key_wrap.c +0 -0
  335. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/aes/mode_wrappers.c +0 -2
  336. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bcm.c +2 -0
  337. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/add.c +0 -0
  338. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/asm/x86_64-gcc.c +0 -0
  339. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/bn.c +0 -0
  340. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/bytes.c +0 -0
  341. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/cmp.c +0 -0
  342. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/ctx.c +0 -0
  343. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/div.c +0 -0
  344. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/div_extra.c +0 -0
  345. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/exponentiation.c +0 -0
  346. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/gcd.c +0 -0
  347. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/gcd_extra.c +0 -0
  348. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/generic.c +0 -0
  349. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/internal.h +0 -0
  350. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/jacobi.c +0 -0
  351. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/montgomery.c +0 -0
  352. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/montgomery_inv.c +0 -0
  353. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/mul.c +0 -0
  354. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/prime.c +11 -12
  355. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/random.c +0 -0
  356. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/rsaz_exp.c +0 -0
  357. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/rsaz_exp.h +0 -0
  358. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/shift.c +0 -0
  359. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/bn/sqrt.c +0 -0
  360. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/cipher/aead.c +0 -0
  361. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/cipher/cipher.c +0 -0
  362. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/cipher/e_aes.c +3 -5
  363. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/cipher/e_des.c +0 -0
  364. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/cipher/internal.h +0 -0
  365. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/delocate.h +0 -0
  366. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/des/des.c +0 -0
  367. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/des/internal.h +0 -0
  368. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/digest/digest.c +0 -0
  369. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/digest/digests.c +0 -0
  370. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/digest/internal.h +0 -0
  371. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/digest/md32_common.h +0 -0
  372. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ec/ec.c +0 -0
  373. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ec/ec_key.c +1 -1
  374. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ec/ec_montgomery.c +0 -0
  375. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ec/felem.c +0 -0
  376. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ec/internal.h +0 -0
  377. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ec/oct.c +0 -0
  378. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ec/p224-64.c +0 -0
  379. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ec/p256-x86_64-table.h +0 -0
  380. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ec/p256-x86_64.c +0 -0
  381. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ec/p256-x86_64.h +0 -0
  382. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ec/scalar.c +0 -0
  383. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ec/simple.c +0 -0
  384. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ec/simple_mul.c +0 -0
  385. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ec/util.c +0 -0
  386. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ec/wnaf.c +0 -0
  387. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ecdh/ecdh.c +0 -0
  388. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/ecdsa/ecdsa.c +0 -0
  389. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/fips_shared_support.c +0 -0
  390. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/hmac/hmac.c +0 -0
  391. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/is_fips.c +0 -0
  392. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/md4/md4.c +0 -0
  393. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/md5/internal.h +0 -0
  394. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/md5/md5.c +0 -0
  395. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/modes/cbc.c +0 -0
  396. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/modes/cfb.c +0 -0
  397. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/modes/ctr.c +0 -0
  398. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/modes/gcm.c +45 -193
  399. data/third_party/boringssl-with-bazel/src/crypto/fipsmodule/modes/gcm_nohw.c +304 -0
  400. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/modes/internal.h +8 -18
  401. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/modes/ofb.c +0 -0
  402. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/modes/polyval.c +0 -0
  403. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/rand/ctrdrbg.c +0 -0
  404. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/rand/internal.h +0 -0
  405. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/rand/rand.c +0 -0
  406. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/rand/urandom.c +0 -0
  407. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/rsa/blinding.c +0 -0
  408. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/rsa/internal.h +0 -0
  409. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/rsa/padding.c +0 -0
  410. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/rsa/rsa.c +7 -1
  411. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/rsa/rsa_impl.c +60 -51
  412. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/self_check/self_check.c +0 -0
  413. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/sha/internal.h +0 -0
  414. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/sha/sha1-altivec.c +0 -0
  415. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/sha/sha1.c +0 -0
  416. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/sha/sha256.c +0 -0
  417. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/sha/sha512.c +0 -0
  418. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/tls/internal.h +0 -0
  419. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/fipsmodule/tls/kdf.c +0 -0
  420. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/hkdf/hkdf.c +0 -0
  421. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/hrss/hrss.c +210 -311
  422. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/hrss/internal.h +0 -1
  423. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/internal.h +21 -1
  424. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/lhash/lhash.c +0 -0
  425. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/mem.c +70 -0
  426. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/obj/obj.c +16 -21
  427. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/obj/obj_dat.h +27 -6
  428. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/obj/obj_xref.c +0 -0
  429. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pem/pem_all.c +0 -0
  430. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pem/pem_info.c +0 -1
  431. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pem/pem_lib.c +7 -7
  432. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pem/pem_oth.c +0 -1
  433. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pem/pem_pk8.c +0 -1
  434. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pem/pem_pkey.c +0 -1
  435. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pem/pem_x509.c +0 -0
  436. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pem/pem_xaux.c +0 -0
  437. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pkcs7/internal.h +0 -0
  438. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pkcs7/pkcs7.c +0 -0
  439. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pkcs7/pkcs7_x509.c +1 -1
  440. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pkcs8/internal.h +0 -0
  441. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pkcs8/p5_pbev2.c +0 -0
  442. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pkcs8/pkcs8.c +0 -0
  443. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pkcs8/pkcs8_x509.c +0 -0
  444. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/poly1305/internal.h +0 -0
  445. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/poly1305/poly1305.c +2 -2
  446. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/poly1305/poly1305_arm.c +21 -20
  447. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/poly1305/poly1305_vec.c +34 -17
  448. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pool/internal.h +0 -0
  449. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/pool/pool.c +1 -2
  450. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/rand_extra/deterministic.c +0 -0
  451. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/rand_extra/forkunsafe.c +0 -0
  452. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/rand_extra/fuchsia.c +0 -0
  453. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/rand_extra/rand_extra.c +0 -0
  454. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/rand_extra/windows.c +0 -0
  455. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/rc4/rc4.c +0 -0
  456. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/refcount_c11.c +0 -0
  457. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/refcount_lock.c +0 -0
  458. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/rsa_extra/rsa_asn1.c +0 -0
  459. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/rsa_extra/rsa_print.c +0 -0
  460. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/siphash/siphash.c +3 -1
  461. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/stack/stack.c +0 -0
  462. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/thread.c +0 -0
  463. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/thread_none.c +0 -0
  464. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/thread_pthread.c +0 -0
  465. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/thread_win.c +0 -0
  466. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/a_digest.c +0 -0
  467. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/a_sign.c +0 -0
  468. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/a_strex.c +0 -0
  469. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/a_verify.c +0 -1
  470. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/algorithm.c +0 -0
  471. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/asn1_gen.c +0 -0
  472. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/by_dir.c +1 -1
  473. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/by_file.c +0 -1
  474. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/charmap.h +0 -0
  475. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/i2d_pr.c +0 -0
  476. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/internal.h +0 -0
  477. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/rsa_pss.c +0 -0
  478. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/t_crl.c +0 -0
  479. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/t_req.c +0 -0
  480. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/t_x509.c +0 -0
  481. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/t_x509a.c +0 -0
  482. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/vpm_int.h +0 -0
  483. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509.c +0 -0
  484. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509_att.c +0 -0
  485. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509_cmp.c +0 -1
  486. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509_d2.c +0 -0
  487. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509_def.c +0 -0
  488. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509_ext.c +0 -0
  489. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509_lu.c +0 -0
  490. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509_obj.c +1 -1
  491. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509_r2x.c +0 -1
  492. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509_req.c +0 -1
  493. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509_set.c +0 -0
  494. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509_trs.c +1 -2
  495. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509_txt.c +0 -0
  496. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509_v3.c +0 -0
  497. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509_vfy.c +0 -1
  498. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509_vpm.c +3 -4
  499. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509cset.c +0 -0
  500. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509name.c +0 -0
  501. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509rset.c +0 -0
  502. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x509spki.c +0 -0
  503. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x_algor.c +0 -0
  504. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x_all.c +0 -1
  505. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x_attrib.c +0 -0
  506. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x_crl.c +0 -0
  507. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x_exten.c +0 -0
  508. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x_info.c +0 -0
  509. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x_name.c +0 -0
  510. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x_pkey.c +0 -0
  511. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x_pubkey.c +0 -0
  512. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x_req.c +0 -0
  513. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x_sig.c +0 -0
  514. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x_spki.c +0 -0
  515. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x_val.c +0 -0
  516. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x_x509.c +0 -0
  517. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509/x_x509a.c +0 -0
  518. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/ext_dat.h +0 -0
  519. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/internal.h +0 -0
  520. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/pcy_cache.c +0 -0
  521. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/pcy_data.c +0 -0
  522. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/pcy_int.h +0 -0
  523. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/pcy_lib.c +0 -0
  524. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/pcy_map.c +0 -0
  525. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/pcy_node.c +0 -0
  526. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/pcy_tree.c +0 -0
  527. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_akey.c +0 -0
  528. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_akeya.c +0 -0
  529. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_alt.c +3 -3
  530. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_bcons.c +0 -0
  531. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_bitst.c +0 -0
  532. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_conf.c +0 -0
  533. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_cpols.c +0 -0
  534. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_crld.c +0 -0
  535. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_enum.c +2 -2
  536. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_extku.c +0 -0
  537. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_genn.c +0 -0
  538. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_ia5.c +0 -0
  539. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_info.c +4 -5
  540. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_int.c +0 -0
  541. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_lib.c +0 -0
  542. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_ncons.c +0 -0
  543. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_ocsp.c +0 -0
  544. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_pci.c +0 -0
  545. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_pcia.c +0 -0
  546. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_pcons.c +0 -0
  547. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_pku.c +0 -0
  548. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_pmaps.c +0 -0
  549. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_prn.c +0 -0
  550. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_purp.c +2 -3
  551. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_skey.c +0 -0
  552. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_sxnet.c +0 -0
  553. data/third_party/{boringssl → boringssl-with-bazel/src}/crypto/x509v3/v3_utl.c +11 -12
  554. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/aead.h +0 -0
  555. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/aes.h +0 -0
  556. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/arm_arch.h +0 -0
  557. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/asn1.h +0 -0
  558. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/asn1_mac.h +0 -0
  559. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/asn1t.h +0 -0
  560. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/base.h +0 -0
  561. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/base64.h +0 -0
  562. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/bio.h +0 -0
  563. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/blowfish.h +0 -0
  564. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/bn.h +32 -20
  565. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/buf.h +9 -9
  566. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/buffer.h +0 -0
  567. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/bytestring.h +34 -0
  568. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/cast.h +0 -0
  569. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/chacha.h +0 -0
  570. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/cipher.h +0 -0
  571. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/cmac.h +0 -0
  572. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/conf.h +0 -0
  573. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/cpu.h +0 -0
  574. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/crypto.h +0 -0
  575. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/curve25519.h +0 -0
  576. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/des.h +0 -0
  577. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/dh.h +0 -0
  578. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/digest.h +0 -0
  579. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/dsa.h +0 -0
  580. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/dtls1.h +0 -0
  581. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/e_os2.h +0 -0
  582. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/ec.h +11 -4
  583. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/ec_key.h +4 -2
  584. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/ecdh.h +0 -0
  585. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/ecdsa.h +0 -0
  586. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/engine.h +0 -0
  587. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/err.h +11 -9
  588. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/evp.h +20 -0
  589. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/ex_data.h +0 -0
  590. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/hkdf.h +0 -0
  591. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/hmac.h +0 -0
  592. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/hrss.h +0 -0
  593. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/is_boringssl.h +0 -0
  594. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/lhash.h +0 -0
  595. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/md4.h +0 -0
  596. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/md5.h +0 -0
  597. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/mem.h +17 -2
  598. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/nid.h +9 -0
  599. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/obj.h +0 -0
  600. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/obj_mac.h +0 -0
  601. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/objects.h +0 -0
  602. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/opensslconf.h +0 -0
  603. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/opensslv.h +0 -0
  604. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/ossl_typ.h +0 -0
  605. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/pem.h +0 -0
  606. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/pkcs12.h +0 -0
  607. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/pkcs7.h +0 -0
  608. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/pkcs8.h +0 -0
  609. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/poly1305.h +5 -7
  610. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/pool.h +0 -0
  611. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/rand.h +0 -0
  612. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/rc4.h +0 -0
  613. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/ripemd.h +0 -0
  614. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/rsa.h +0 -0
  615. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/safestack.h +0 -0
  616. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/sha.h +0 -0
  617. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/siphash.h +0 -0
  618. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/span.h +0 -0
  619. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/srtp.h +0 -0
  620. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/ssl.h +10 -20
  621. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/ssl3.h +0 -0
  622. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/stack.h +0 -0
  623. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/thread.h +0 -0
  624. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/tls1.h +0 -3
  625. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/type_check.h +0 -0
  626. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/x509.h +0 -0
  627. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/x509_vfy.h +0 -0
  628. data/third_party/{boringssl → boringssl-with-bazel/src}/include/openssl/x509v3.h +0 -0
  629. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/bio_ssl.cc +0 -0
  630. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/d1_both.cc +0 -1
  631. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/d1_lib.cc +0 -0
  632. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/d1_pkt.cc +0 -1
  633. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/d1_srtp.cc +0 -0
  634. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/dtls_method.cc +0 -1
  635. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/dtls_record.cc +0 -0
  636. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/handoff.cc +126 -29
  637. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/handshake.cc +5 -4
  638. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/handshake_client.cc +24 -13
  639. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/handshake_server.cc +1 -5
  640. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/internal.h +32 -26
  641. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/s3_both.cc +0 -0
  642. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/s3_lib.cc +2 -3
  643. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/s3_pkt.cc +0 -1
  644. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/ssl_aead_ctx.cc +0 -0
  645. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/ssl_asn1.cc +1 -2
  646. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/ssl_buffer.cc +34 -15
  647. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/ssl_cert.cc +0 -1
  648. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/ssl_cipher.cc +0 -1
  649. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/ssl_file.cc +0 -0
  650. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/ssl_key_share.cc +0 -0
  651. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/ssl_lib.cc +13 -14
  652. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/ssl_privkey.cc +0 -0
  653. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/ssl_session.cc +2 -1
  654. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/ssl_stat.cc +0 -0
  655. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/ssl_transcript.cc +0 -0
  656. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/ssl_versions.cc +1 -1
  657. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/ssl_x509.cc +0 -0
  658. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/t1_enc.cc +0 -0
  659. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/t1_lib.cc +11 -171
  660. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/tls13_both.cc +0 -0
  661. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/tls13_client.cc +3 -4
  662. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/tls13_enc.cc +5 -1
  663. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/tls13_server.cc +78 -101
  664. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/tls_method.cc +1 -1
  665. data/third_party/{boringssl → boringssl-with-bazel/src}/ssl/tls_record.cc +7 -2
  666. data/third_party/{boringssl → boringssl-with-bazel/src}/third_party/fiat/curve25519.c +0 -0
  667. data/third_party/{boringssl → boringssl-with-bazel/src}/third_party/fiat/curve25519_32.h +0 -0
  668. data/third_party/{boringssl → boringssl-with-bazel/src}/third_party/fiat/curve25519_64.h +0 -0
  669. data/third_party/{boringssl → boringssl-with-bazel/src}/third_party/fiat/curve25519_tables.h +0 -0
  670. data/third_party/{boringssl → boringssl-with-bazel/src}/third_party/fiat/internal.h +0 -0
  671. data/third_party/{boringssl → boringssl-with-bazel/src}/third_party/fiat/p256.c +0 -0
  672. data/third_party/{boringssl → boringssl-with-bazel/src}/third_party/fiat/p256_32.h +0 -0
  673. data/third_party/{boringssl → boringssl-with-bazel/src}/third_party/fiat/p256_64.h +0 -0
  674. metadata +562 -491
  675. data/src/core/lib/iomgr/logical_thread.cc +0 -103
  676. data/src/core/lib/iomgr/logical_thread.h +0 -52
  677. data/src/core/lib/json/json.cc +0 -94
  678. data/third_party/boringssl/crypto/fipsmodule/aes/aes.c +0 -860
@@ -0,0 +1,333 @@
1
+ #ifndef ABSL_STRINGS_INTERNAL_STR_FORMAT_PARSER_H_
2
+ #define ABSL_STRINGS_INTERNAL_STR_FORMAT_PARSER_H_
3
+
4
+ #include <limits.h>
5
+ #include <stddef.h>
6
+ #include <stdlib.h>
7
+
8
+ #include <cassert>
9
+ #include <cstdint>
10
+ #include <initializer_list>
11
+ #include <iosfwd>
12
+ #include <iterator>
13
+ #include <memory>
14
+ #include <string>
15
+ #include <vector>
16
+
17
+ #include "absl/strings/internal/str_format/checker.h"
18
+ #include "absl/strings/internal/str_format/extension.h"
19
+
20
+ namespace absl {
21
+ ABSL_NAMESPACE_BEGIN
22
+ namespace str_format_internal {
23
+
24
+ enum class LengthMod : std::uint8_t { h, hh, l, ll, L, j, z, t, q, none };
25
+
26
+ std::string LengthModToString(LengthMod v);
27
+
28
+ // The analyzed properties of a single specified conversion.
29
+ struct UnboundConversion {
30
+ UnboundConversion()
31
+ : flags() /* This is required to zero all the fields of flags. */ {
32
+ flags.basic = true;
33
+ }
34
+
35
+ class InputValue {
36
+ public:
37
+ void set_value(int value) {
38
+ assert(value >= 0);
39
+ value_ = value;
40
+ }
41
+ int value() const { return value_; }
42
+
43
+ // Marks the value as "from arg". aka the '*' format.
44
+ // Requires `value >= 1`.
45
+ // When set, is_from_arg() return true and get_from_arg() returns the
46
+ // original value.
47
+ // `value()`'s return value is unspecfied in this state.
48
+ void set_from_arg(int value) {
49
+ assert(value > 0);
50
+ value_ = -value - 1;
51
+ }
52
+ bool is_from_arg() const { return value_ < -1; }
53
+ int get_from_arg() const {
54
+ assert(is_from_arg());
55
+ return -value_ - 1;
56
+ }
57
+
58
+ private:
59
+ int value_ = -1;
60
+ };
61
+
62
+ // No need to initialize. It will always be set in the parser.
63
+ int arg_position;
64
+
65
+ InputValue width;
66
+ InputValue precision;
67
+
68
+ Flags flags;
69
+ LengthMod length_mod = LengthMod::none;
70
+ ConversionChar conv = FormatConversionChar::kNone;
71
+ };
72
+
73
+ // Consume conversion spec prefix (not including '%') of [p, end) if valid.
74
+ // Examples of valid specs would be e.g.: "s", "d", "-12.6f".
75
+ // If valid, it returns the first character following the conversion spec,
76
+ // and the spec part is broken down and returned in 'conv'.
77
+ // If invalid, returns nullptr.
78
+ const char* ConsumeUnboundConversion(const char* p, const char* end,
79
+ UnboundConversion* conv, int* next_arg);
80
+
81
+ // Helper tag class for the table below.
82
+ // It allows fast `char -> ConversionChar/LengthMod` checking and
83
+ // conversions.
84
+ class ConvTag {
85
+ public:
86
+ constexpr ConvTag(ConversionChar conversion_char) // NOLINT
87
+ : tag_(static_cast<int8_t>(conversion_char)) {}
88
+ // We invert the length modifiers to make them negative so that we can easily
89
+ // test for them.
90
+ constexpr ConvTag(LengthMod length_mod) // NOLINT
91
+ : tag_(~static_cast<std::int8_t>(length_mod)) {}
92
+ // Everything else is -128, which is negative to make is_conv() simpler.
93
+ constexpr ConvTag() : tag_(-128) {}
94
+
95
+ bool is_conv() const { return tag_ >= 0; }
96
+ bool is_length() const { return tag_ < 0 && tag_ != -128; }
97
+ ConversionChar as_conv() const {
98
+ assert(is_conv());
99
+ return static_cast<ConversionChar>(tag_);
100
+ }
101
+ LengthMod as_length() const {
102
+ assert(is_length());
103
+ return static_cast<LengthMod>(~tag_);
104
+ }
105
+
106
+ private:
107
+ std::int8_t tag_;
108
+ };
109
+
110
+ extern const ConvTag kTags[256];
111
+ // Keep a single table for all the conversion chars and length modifiers.
112
+ inline ConvTag GetTagForChar(char c) {
113
+ return kTags[static_cast<unsigned char>(c)];
114
+ }
115
+
116
+ // Parse the format string provided in 'src' and pass the identified items into
117
+ // 'consumer'.
118
+ // Text runs will be passed by calling
119
+ // Consumer::Append(string_view);
120
+ // ConversionItems will be passed by calling
121
+ // Consumer::ConvertOne(UnboundConversion, string_view);
122
+ // In the case of ConvertOne, the string_view that is passed is the
123
+ // portion of the format string corresponding to the conversion, not including
124
+ // the leading %. On success, it returns true. On failure, it stops and returns
125
+ // false.
126
+ template <typename Consumer>
127
+ bool ParseFormatString(string_view src, Consumer consumer) {
128
+ int next_arg = 0;
129
+ const char* p = src.data();
130
+ const char* const end = p + src.size();
131
+ while (p != end) {
132
+ const char* percent = static_cast<const char*>(memchr(p, '%', end - p));
133
+ if (!percent) {
134
+ // We found the last substring.
135
+ return consumer.Append(string_view(p, end - p));
136
+ }
137
+ // We found a percent, so push the text run then process the percent.
138
+ if (ABSL_PREDICT_FALSE(!consumer.Append(string_view(p, percent - p)))) {
139
+ return false;
140
+ }
141
+ if (ABSL_PREDICT_FALSE(percent + 1 >= end)) return false;
142
+
143
+ auto tag = GetTagForChar(percent[1]);
144
+ if (tag.is_conv()) {
145
+ if (ABSL_PREDICT_FALSE(next_arg < 0)) {
146
+ // This indicates an error in the format std::string.
147
+ // The only way to get `next_arg < 0` here is to have a positional
148
+ // argument first which sets next_arg to -1 and then a non-positional
149
+ // argument.
150
+ return false;
151
+ }
152
+ p = percent + 2;
153
+
154
+ // Keep this case separate from the one below.
155
+ // ConvertOne is more efficient when the compiler can see that the `basic`
156
+ // flag is set.
157
+ UnboundConversion conv;
158
+ conv.conv = tag.as_conv();
159
+ conv.arg_position = ++next_arg;
160
+ if (ABSL_PREDICT_FALSE(
161
+ !consumer.ConvertOne(conv, string_view(percent + 1, 1)))) {
162
+ return false;
163
+ }
164
+ } else if (percent[1] != '%') {
165
+ UnboundConversion conv;
166
+ p = ConsumeUnboundConversion(percent + 1, end, &conv, &next_arg);
167
+ if (ABSL_PREDICT_FALSE(p == nullptr)) return false;
168
+ if (ABSL_PREDICT_FALSE(!consumer.ConvertOne(
169
+ conv, string_view(percent + 1, p - (percent + 1))))) {
170
+ return false;
171
+ }
172
+ } else {
173
+ if (ABSL_PREDICT_FALSE(!consumer.Append("%"))) return false;
174
+ p = percent + 2;
175
+ continue;
176
+ }
177
+ }
178
+ return true;
179
+ }
180
+
181
+ // Always returns true, or fails to compile in a constexpr context if s does not
182
+ // point to a constexpr char array.
183
+ constexpr bool EnsureConstexpr(string_view s) {
184
+ return s.empty() || s[0] == s[0];
185
+ }
186
+
187
+ class ParsedFormatBase {
188
+ public:
189
+ explicit ParsedFormatBase(string_view format, bool allow_ignored,
190
+ std::initializer_list<Conv> convs);
191
+
192
+ ParsedFormatBase(const ParsedFormatBase& other) { *this = other; }
193
+
194
+ ParsedFormatBase(ParsedFormatBase&& other) { *this = std::move(other); }
195
+
196
+ ParsedFormatBase& operator=(const ParsedFormatBase& other) {
197
+ if (this == &other) return *this;
198
+ has_error_ = other.has_error_;
199
+ items_ = other.items_;
200
+ size_t text_size = items_.empty() ? 0 : items_.back().text_end;
201
+ data_.reset(new char[text_size]);
202
+ memcpy(data_.get(), other.data_.get(), text_size);
203
+ return *this;
204
+ }
205
+
206
+ ParsedFormatBase& operator=(ParsedFormatBase&& other) {
207
+ if (this == &other) return *this;
208
+ has_error_ = other.has_error_;
209
+ data_ = std::move(other.data_);
210
+ items_ = std::move(other.items_);
211
+ // Reset the vector to make sure the invariants hold.
212
+ other.items_.clear();
213
+ return *this;
214
+ }
215
+
216
+ template <typename Consumer>
217
+ bool ProcessFormat(Consumer consumer) const {
218
+ const char* const base = data_.get();
219
+ string_view text(base, 0);
220
+ for (const auto& item : items_) {
221
+ const char* const end = text.data() + text.size();
222
+ text = string_view(end, (base + item.text_end) - end);
223
+ if (item.is_conversion) {
224
+ if (!consumer.ConvertOne(item.conv, text)) return false;
225
+ } else {
226
+ if (!consumer.Append(text)) return false;
227
+ }
228
+ }
229
+ return !has_error_;
230
+ }
231
+
232
+ bool has_error() const { return has_error_; }
233
+
234
+ private:
235
+ // Returns whether the conversions match and if !allow_ignored it verifies
236
+ // that all conversions are used by the format.
237
+ bool MatchesConversions(bool allow_ignored,
238
+ std::initializer_list<Conv> convs) const;
239
+
240
+ struct ParsedFormatConsumer;
241
+
242
+ struct ConversionItem {
243
+ bool is_conversion;
244
+ // Points to the past-the-end location of this element in the data_ array.
245
+ size_t text_end;
246
+ UnboundConversion conv;
247
+ };
248
+
249
+ bool has_error_;
250
+ std::unique_ptr<char[]> data_;
251
+ std::vector<ConversionItem> items_;
252
+ };
253
+
254
+
255
+ // A value type representing a preparsed format. These can be created, copied
256
+ // around, and reused to speed up formatting loops.
257
+ // The user must specify through the template arguments the conversion
258
+ // characters used in the format. This will be checked at compile time.
259
+ //
260
+ // This class uses Conv enum values to specify each argument.
261
+ // This allows for more flexibility as you can specify multiple possible
262
+ // conversion characters for each argument.
263
+ // ParsedFormat<char...> is a simplified alias for when the user only
264
+ // needs to specify a single conversion character for each argument.
265
+ //
266
+ // Example:
267
+ // // Extended format supports multiple characters per argument:
268
+ // using MyFormat = ExtendedParsedFormat<Conv::d | Conv::x>;
269
+ // MyFormat GetFormat(bool use_hex) {
270
+ // if (use_hex) return MyFormat("foo %x bar");
271
+ // return MyFormat("foo %d bar");
272
+ // }
273
+ // // 'format' can be used with any value that supports 'd' and 'x',
274
+ // // like `int`.
275
+ // auto format = GetFormat(use_hex);
276
+ // value = StringF(format, i);
277
+ //
278
+ // This class also supports runtime format checking with the ::New() and
279
+ // ::NewAllowIgnored() factory functions.
280
+ // This is the only API that allows the user to pass a runtime specified format
281
+ // string. These factory functions will return NULL if the format does not match
282
+ // the conversions requested by the user.
283
+ template <str_format_internal::Conv... C>
284
+ class ExtendedParsedFormat : public str_format_internal::ParsedFormatBase {
285
+ public:
286
+ explicit ExtendedParsedFormat(string_view format)
287
+ #ifdef ABSL_INTERNAL_ENABLE_FORMAT_CHECKER
288
+ __attribute__((
289
+ enable_if(str_format_internal::EnsureConstexpr(format),
290
+ "Format std::string is not constexpr."),
291
+ enable_if(str_format_internal::ValidFormatImpl<C...>(format),
292
+ "Format specified does not match the template arguments.")))
293
+ #endif // ABSL_INTERNAL_ENABLE_FORMAT_CHECKER
294
+ : ExtendedParsedFormat(format, false) {
295
+ }
296
+
297
+ // ExtendedParsedFormat factory function.
298
+ // The user still has to specify the conversion characters, but they will not
299
+ // be checked at compile time. Instead, it will be checked at runtime.
300
+ // This delays the checking to runtime, but allows the user to pass
301
+ // dynamically sourced formats.
302
+ // It returns NULL if the format does not match the conversion characters.
303
+ // The user is responsible for checking the return value before using it.
304
+ //
305
+ // The 'New' variant will check that all the specified arguments are being
306
+ // consumed by the format and return NULL if any argument is being ignored.
307
+ // The 'NewAllowIgnored' variant will not verify this and will allow formats
308
+ // that ignore arguments.
309
+ static std::unique_ptr<ExtendedParsedFormat> New(string_view format) {
310
+ return New(format, false);
311
+ }
312
+ static std::unique_ptr<ExtendedParsedFormat> NewAllowIgnored(
313
+ string_view format) {
314
+ return New(format, true);
315
+ }
316
+
317
+ private:
318
+ static std::unique_ptr<ExtendedParsedFormat> New(string_view format,
319
+ bool allow_ignored) {
320
+ std::unique_ptr<ExtendedParsedFormat> conv(
321
+ new ExtendedParsedFormat(format, allow_ignored));
322
+ if (conv->has_error()) return nullptr;
323
+ return conv;
324
+ }
325
+
326
+ ExtendedParsedFormat(string_view s, bool allow_ignored)
327
+ : ParsedFormatBase(s, allow_ignored, {C...}) {}
328
+ };
329
+ } // namespace str_format_internal
330
+ ABSL_NAMESPACE_END
331
+ } // namespace absl
332
+
333
+ #endif // ABSL_STRINGS_INTERNAL_STR_FORMAT_PARSER_H_
@@ -0,0 +1,537 @@
1
+ //
2
+ // Copyright 2018 The Abseil Authors.
3
+ //
4
+ // Licensed under the Apache License, Version 2.0 (the "License");
5
+ // you may not use this file except in compliance with the License.
6
+ // You may obtain a copy of the License at
7
+ //
8
+ // https://www.apache.org/licenses/LICENSE-2.0
9
+ //
10
+ // Unless required by applicable law or agreed to in writing, software
11
+ // distributed under the License is distributed on an "AS IS" BASIS,
12
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ // See the License for the specific language governing permissions and
14
+ // limitations under the License.
15
+ //
16
+ // -----------------------------------------------------------------------------
17
+ // File: str_format.h
18
+ // -----------------------------------------------------------------------------
19
+ //
20
+ // The `str_format` library is a typesafe replacement for the family of
21
+ // `printf()` string formatting routines within the `<cstdio>` standard library
22
+ // header. Like the `printf` family, the `str_format` uses a "format string" to
23
+ // perform argument substitutions based on types. See the `FormatSpec` section
24
+ // below for format string documentation.
25
+ //
26
+ // Example:
27
+ //
28
+ // std::string s = absl::StrFormat(
29
+ // "%s %s You have $%d!", "Hello", name, dollars);
30
+ //
31
+ // The library consists of the following basic utilities:
32
+ //
33
+ // * `absl::StrFormat()`, a type-safe replacement for `std::sprintf()`, to
34
+ // write a format string to a `string` value.
35
+ // * `absl::StrAppendFormat()` to append a format string to a `string`
36
+ // * `absl::StreamFormat()` to more efficiently write a format string to a
37
+ // stream, such as`std::cout`.
38
+ // * `absl::PrintF()`, `absl::FPrintF()` and `absl::SNPrintF()` as
39
+ // replacements for `std::printf()`, `std::fprintf()` and `std::snprintf()`.
40
+ //
41
+ // Note: a version of `std::sprintf()` is not supported as it is
42
+ // generally unsafe due to buffer overflows.
43
+ //
44
+ // Additionally, you can provide a format string (and its associated arguments)
45
+ // using one of the following abstractions:
46
+ //
47
+ // * A `FormatSpec` class template fully encapsulates a format string and its
48
+ // type arguments and is usually provided to `str_format` functions as a
49
+ // variadic argument of type `FormatSpec<Arg...>`. The `FormatSpec<Args...>`
50
+ // template is evaluated at compile-time, providing type safety.
51
+ // * A `ParsedFormat` instance, which encapsulates a specific, pre-compiled
52
+ // format string for a specific set of type(s), and which can be passed
53
+ // between API boundaries. (The `FormatSpec` type should not be used
54
+ // directly except as an argument type for wrapper functions.)
55
+ //
56
+ // The `str_format` library provides the ability to output its format strings to
57
+ // arbitrary sink types:
58
+ //
59
+ // * A generic `Format()` function to write outputs to arbitrary sink types,
60
+ // which must implement a `RawSinkFormat` interface. (See
61
+ // `str_format_sink.h` for more information.)
62
+ //
63
+ // * A `FormatUntyped()` function that is similar to `Format()` except it is
64
+ // loosely typed. `FormatUntyped()` is not a template and does not perform
65
+ // any compile-time checking of the format string; instead, it returns a
66
+ // boolean from a runtime check.
67
+ //
68
+ // In addition, the `str_format` library provides extension points for
69
+ // augmenting formatting to new types. These extensions are fully documented
70
+ // within the `str_format_extension.h` header file.
71
+
72
+ #ifndef ABSL_STRINGS_STR_FORMAT_H_
73
+ #define ABSL_STRINGS_STR_FORMAT_H_
74
+
75
+ #include <cstdio>
76
+ #include <string>
77
+
78
+ #include "absl/strings/internal/str_format/arg.h" // IWYU pragma: export
79
+ #include "absl/strings/internal/str_format/bind.h" // IWYU pragma: export
80
+ #include "absl/strings/internal/str_format/checker.h" // IWYU pragma: export
81
+ #include "absl/strings/internal/str_format/extension.h" // IWYU pragma: export
82
+ #include "absl/strings/internal/str_format/parser.h" // IWYU pragma: export
83
+
84
+ namespace absl {
85
+ ABSL_NAMESPACE_BEGIN
86
+
87
+ // UntypedFormatSpec
88
+ //
89
+ // A type-erased class that can be used directly within untyped API entry
90
+ // points. An `UntypedFormatSpec` is specifically used as an argument to
91
+ // `FormatUntyped()`.
92
+ //
93
+ // Example:
94
+ //
95
+ // absl::UntypedFormatSpec format("%d");
96
+ // std::string out;
97
+ // CHECK(absl::FormatUntyped(&out, format, {absl::FormatArg(1)}));
98
+ class UntypedFormatSpec {
99
+ public:
100
+ UntypedFormatSpec() = delete;
101
+ UntypedFormatSpec(const UntypedFormatSpec&) = delete;
102
+ UntypedFormatSpec& operator=(const UntypedFormatSpec&) = delete;
103
+
104
+ explicit UntypedFormatSpec(string_view s) : spec_(s) {}
105
+
106
+ protected:
107
+ explicit UntypedFormatSpec(const str_format_internal::ParsedFormatBase* pc)
108
+ : spec_(pc) {}
109
+
110
+ private:
111
+ friend str_format_internal::UntypedFormatSpecImpl;
112
+ str_format_internal::UntypedFormatSpecImpl spec_;
113
+ };
114
+
115
+ // FormatStreamed()
116
+ //
117
+ // Takes a streamable argument and returns an object that can print it
118
+ // with '%s'. Allows printing of types that have an `operator<<` but no
119
+ // intrinsic type support within `StrFormat()` itself.
120
+ //
121
+ // Example:
122
+ //
123
+ // absl::StrFormat("%s", absl::FormatStreamed(obj));
124
+ template <typename T>
125
+ str_format_internal::StreamedWrapper<T> FormatStreamed(const T& v) {
126
+ return str_format_internal::StreamedWrapper<T>(v);
127
+ }
128
+
129
+ // FormatCountCapture
130
+ //
131
+ // This class provides a way to safely wrap `StrFormat()` captures of `%n`
132
+ // conversions, which denote the number of characters written by a formatting
133
+ // operation to this point, into an integer value.
134
+ //
135
+ // This wrapper is designed to allow safe usage of `%n` within `StrFormat(); in
136
+ // the `printf()` family of functions, `%n` is not safe to use, as the `int *`
137
+ // buffer can be used to capture arbitrary data.
138
+ //
139
+ // Example:
140
+ //
141
+ // int n = 0;
142
+ // std::string s = absl::StrFormat("%s%d%n", "hello", 123,
143
+ // absl::FormatCountCapture(&n));
144
+ // EXPECT_EQ(8, n);
145
+ class FormatCountCapture {
146
+ public:
147
+ explicit FormatCountCapture(int* p) : p_(p) {}
148
+
149
+ private:
150
+ // FormatCountCaptureHelper is used to define FormatConvertImpl() for this
151
+ // class.
152
+ friend struct str_format_internal::FormatCountCaptureHelper;
153
+ // Unused() is here because of the false positive from -Wunused-private-field
154
+ // p_ is used in the templated function of the friend FormatCountCaptureHelper
155
+ // class.
156
+ int* Unused() { return p_; }
157
+ int* p_;
158
+ };
159
+
160
+ // FormatSpec
161
+ //
162
+ // The `FormatSpec` type defines the makeup of a format string within the
163
+ // `str_format` library. It is a variadic class template that is evaluated at
164
+ // compile-time, according to the format string and arguments that are passed to
165
+ // it.
166
+ //
167
+ // You should not need to manipulate this type directly. You should only name it
168
+ // if you are writing wrapper functions which accept format arguments that will
169
+ // be provided unmodified to functions in this library. Such a wrapper function
170
+ // might be a class method that provides format arguments and/or internally uses
171
+ // the result of formatting.
172
+ //
173
+ // For a `FormatSpec` to be valid at compile-time, it must be provided as
174
+ // either:
175
+ //
176
+ // * A `constexpr` literal or `absl::string_view`, which is how it most often
177
+ // used.
178
+ // * A `ParsedFormat` instantiation, which ensures the format string is
179
+ // valid before use. (See below.)
180
+ //
181
+ // Example:
182
+ //
183
+ // // Provided as a string literal.
184
+ // absl::StrFormat("Welcome to %s, Number %d!", "The Village", 6);
185
+ //
186
+ // // Provided as a constexpr absl::string_view.
187
+ // constexpr absl::string_view formatString = "Welcome to %s, Number %d!";
188
+ // absl::StrFormat(formatString, "The Village", 6);
189
+ //
190
+ // // Provided as a pre-compiled ParsedFormat object.
191
+ // // Note that this example is useful only for illustration purposes.
192
+ // absl::ParsedFormat<'s', 'd'> formatString("Welcome to %s, Number %d!");
193
+ // absl::StrFormat(formatString, "TheVillage", 6);
194
+ //
195
+ // A format string generally follows the POSIX syntax as used within the POSIX
196
+ // `printf` specification.
197
+ //
198
+ // (See http://pubs.opengroup.org/onlinepubs/9699919799/functions/fprintf.html.)
199
+ //
200
+ // In specific, the `FormatSpec` supports the following type specifiers:
201
+ // * `c` for characters
202
+ // * `s` for strings
203
+ // * `d` or `i` for integers
204
+ // * `o` for unsigned integer conversions into octal
205
+ // * `x` or `X` for unsigned integer conversions into hex
206
+ // * `u` for unsigned integers
207
+ // * `f` or `F` for floating point values into decimal notation
208
+ // * `e` or `E` for floating point values into exponential notation
209
+ // * `a` or `A` for floating point values into hex exponential notation
210
+ // * `g` or `G` for floating point values into decimal or exponential
211
+ // notation based on their precision
212
+ // * `p` for pointer address values
213
+ // * `n` for the special case of writing out the number of characters
214
+ // written to this point. The resulting value must be captured within an
215
+ // `absl::FormatCountCapture` type.
216
+ //
217
+ // Implementation-defined behavior:
218
+ // * A null pointer provided to "%s" or "%p" is output as "(nil)".
219
+ // * A non-null pointer provided to "%p" is output in hex as if by %#x or
220
+ // %#lx.
221
+ //
222
+ // NOTE: `o`, `x\X` and `u` will convert signed values to their unsigned
223
+ // counterpart before formatting.
224
+ //
225
+ // Examples:
226
+ // "%c", 'a' -> "a"
227
+ // "%c", 32 -> " "
228
+ // "%s", "C" -> "C"
229
+ // "%s", std::string("C++") -> "C++"
230
+ // "%d", -10 -> "-10"
231
+ // "%o", 10 -> "12"
232
+ // "%x", 16 -> "10"
233
+ // "%f", 123456789 -> "123456789.000000"
234
+ // "%e", .01 -> "1.00000e-2"
235
+ // "%a", -3.0 -> "-0x1.8p+1"
236
+ // "%g", .01 -> "1e-2"
237
+ // "%p", (void*)&value -> "0x7ffdeb6ad2a4"
238
+ //
239
+ // int n = 0;
240
+ // std::string s = absl::StrFormat(
241
+ // "%s%d%n", "hello", 123, absl::FormatCountCapture(&n));
242
+ // EXPECT_EQ(8, n);
243
+ //
244
+ // The `FormatSpec` intrinsically supports all of these fundamental C++ types:
245
+ //
246
+ // * Characters: `char`, `signed char`, `unsigned char`
247
+ // * Integers: `int`, `short`, `unsigned short`, `unsigned`, `long`,
248
+ // `unsigned long`, `long long`, `unsigned long long`
249
+ // * Floating-point: `float`, `double`, `long double`
250
+ //
251
+ // However, in the `str_format` library, a format conversion specifies a broader
252
+ // C++ conceptual category instead of an exact type. For example, `%s` binds to
253
+ // any string-like argument, so `std::string`, `absl::string_view`, and
254
+ // `const char*` are all accepted. Likewise, `%d` accepts any integer-like
255
+ // argument, etc.
256
+
257
+ template <typename... Args>
258
+ using FormatSpec =
259
+ typename str_format_internal::FormatSpecDeductionBarrier<Args...>::type;
260
+
261
+ // ParsedFormat
262
+ //
263
+ // A `ParsedFormat` is a class template representing a preparsed `FormatSpec`,
264
+ // with template arguments specifying the conversion characters used within the
265
+ // format string. Such characters must be valid format type specifiers, and
266
+ // these type specifiers are checked at compile-time.
267
+ //
268
+ // Instances of `ParsedFormat` can be created, copied, and reused to speed up
269
+ // formatting loops. A `ParsedFormat` may either be constructed statically, or
270
+ // dynamically through its `New()` factory function, which only constructs a
271
+ // runtime object if the format is valid at that time.
272
+ //
273
+ // Example:
274
+ //
275
+ // // Verified at compile time.
276
+ // absl::ParsedFormat<'s', 'd'> formatString("Welcome to %s, Number %d!");
277
+ // absl::StrFormat(formatString, "TheVillage", 6);
278
+ //
279
+ // // Verified at runtime.
280
+ // auto format_runtime = absl::ParsedFormat<'d'>::New(format_string);
281
+ // if (format_runtime) {
282
+ // value = absl::StrFormat(*format_runtime, i);
283
+ // } else {
284
+ // ... error case ...
285
+ // }
286
+ template <char... Conv>
287
+ using ParsedFormat = str_format_internal::ExtendedParsedFormat<
288
+ str_format_internal::ConversionCharToConv(Conv)...>;
289
+
290
+ // StrFormat()
291
+ //
292
+ // Returns a `string` given a `printf()`-style format string and zero or more
293
+ // additional arguments. Use it as you would `sprintf()`. `StrFormat()` is the
294
+ // primary formatting function within the `str_format` library, and should be
295
+ // used in most cases where you need type-safe conversion of types into
296
+ // formatted strings.
297
+ //
298
+ // The format string generally consists of ordinary character data along with
299
+ // one or more format conversion specifiers (denoted by the `%` character).
300
+ // Ordinary character data is returned unchanged into the result string, while
301
+ // each conversion specification performs a type substitution from
302
+ // `StrFormat()`'s other arguments. See the comments for `FormatSpec` for full
303
+ // information on the makeup of this format string.
304
+ //
305
+ // Example:
306
+ //
307
+ // std::string s = absl::StrFormat(
308
+ // "Welcome to %s, Number %d!", "The Village", 6);
309
+ // EXPECT_EQ("Welcome to The Village, Number 6!", s);
310
+ //
311
+ // Returns an empty string in case of error.
312
+ template <typename... Args>
313
+ ABSL_MUST_USE_RESULT std::string StrFormat(const FormatSpec<Args...>& format,
314
+ const Args&... args) {
315
+ return str_format_internal::FormatPack(
316
+ str_format_internal::UntypedFormatSpecImpl::Extract(format),
317
+ {str_format_internal::FormatArgImpl(args)...});
318
+ }
319
+
320
+ // StrAppendFormat()
321
+ //
322
+ // Appends to a `dst` string given a format string, and zero or more additional
323
+ // arguments, returning `*dst` as a convenience for chaining purposes. Appends
324
+ // nothing in case of error (but possibly alters its capacity).
325
+ //
326
+ // Example:
327
+ //
328
+ // std::string orig("For example PI is approximately ");
329
+ // std::cout << StrAppendFormat(&orig, "%12.6f", 3.14);
330
+ template <typename... Args>
331
+ std::string& StrAppendFormat(std::string* dst,
332
+ const FormatSpec<Args...>& format,
333
+ const Args&... args) {
334
+ return str_format_internal::AppendPack(
335
+ dst, str_format_internal::UntypedFormatSpecImpl::Extract(format),
336
+ {str_format_internal::FormatArgImpl(args)...});
337
+ }
338
+
339
+ // StreamFormat()
340
+ //
341
+ // Writes to an output stream given a format string and zero or more arguments,
342
+ // generally in a manner that is more efficient than streaming the result of
343
+ // `absl:: StrFormat()`. The returned object must be streamed before the full
344
+ // expression ends.
345
+ //
346
+ // Example:
347
+ //
348
+ // std::cout << StreamFormat("%12.6f", 3.14);
349
+ template <typename... Args>
350
+ ABSL_MUST_USE_RESULT str_format_internal::Streamable StreamFormat(
351
+ const FormatSpec<Args...>& format, const Args&... args) {
352
+ return str_format_internal::Streamable(
353
+ str_format_internal::UntypedFormatSpecImpl::Extract(format),
354
+ {str_format_internal::FormatArgImpl(args)...});
355
+ }
356
+
357
+ // PrintF()
358
+ //
359
+ // Writes to stdout given a format string and zero or more arguments. This
360
+ // function is functionally equivalent to `std::printf()` (and type-safe);
361
+ // prefer `absl::PrintF()` over `std::printf()`.
362
+ //
363
+ // Example:
364
+ //
365
+ // std::string_view s = "Ulaanbaatar";
366
+ // absl::PrintF("The capital of Mongolia is %s", s);
367
+ //
368
+ // Outputs: "The capital of Mongolia is Ulaanbaatar"
369
+ //
370
+ template <typename... Args>
371
+ int PrintF(const FormatSpec<Args...>& format, const Args&... args) {
372
+ return str_format_internal::FprintF(
373
+ stdout, str_format_internal::UntypedFormatSpecImpl::Extract(format),
374
+ {str_format_internal::FormatArgImpl(args)...});
375
+ }
376
+
377
+ // FPrintF()
378
+ //
379
+ // Writes to a file given a format string and zero or more arguments. This
380
+ // function is functionally equivalent to `std::fprintf()` (and type-safe);
381
+ // prefer `absl::FPrintF()` over `std::fprintf()`.
382
+ //
383
+ // Example:
384
+ //
385
+ // std::string_view s = "Ulaanbaatar";
386
+ // absl::FPrintF(stdout, "The capital of Mongolia is %s", s);
387
+ //
388
+ // Outputs: "The capital of Mongolia is Ulaanbaatar"
389
+ //
390
+ template <typename... Args>
391
+ int FPrintF(std::FILE* output, const FormatSpec<Args...>& format,
392
+ const Args&... args) {
393
+ return str_format_internal::FprintF(
394
+ output, str_format_internal::UntypedFormatSpecImpl::Extract(format),
395
+ {str_format_internal::FormatArgImpl(args)...});
396
+ }
397
+
398
+ // SNPrintF()
399
+ //
400
+ // Writes to a sized buffer given a format string and zero or more arguments.
401
+ // This function is functionally equivalent to `std::snprintf()` (and
402
+ // type-safe); prefer `absl::SNPrintF()` over `std::snprintf()`.
403
+ //
404
+ // In particular, a successful call to `absl::SNPrintF()` writes at most `size`
405
+ // bytes of the formatted output to `output`, including a NUL-terminator, and
406
+ // returns the number of bytes that would have been written if truncation did
407
+ // not occur. In the event of an error, a negative value is returned and `errno`
408
+ // is set.
409
+ //
410
+ // Example:
411
+ //
412
+ // std::string_view s = "Ulaanbaatar";
413
+ // char output[128];
414
+ // absl::SNPrintF(output, sizeof(output),
415
+ // "The capital of Mongolia is %s", s);
416
+ //
417
+ // Post-condition: output == "The capital of Mongolia is Ulaanbaatar"
418
+ //
419
+ template <typename... Args>
420
+ int SNPrintF(char* output, std::size_t size, const FormatSpec<Args...>& format,
421
+ const Args&... args) {
422
+ return str_format_internal::SnprintF(
423
+ output, size, str_format_internal::UntypedFormatSpecImpl::Extract(format),
424
+ {str_format_internal::FormatArgImpl(args)...});
425
+ }
426
+
427
+ // -----------------------------------------------------------------------------
428
+ // Custom Output Formatting Functions
429
+ // -----------------------------------------------------------------------------
430
+
431
+ // FormatRawSink
432
+ //
433
+ // FormatRawSink is a type erased wrapper around arbitrary sink objects
434
+ // specifically used as an argument to `Format()`.
435
+ // FormatRawSink does not own the passed sink object. The passed object must
436
+ // outlive the FormatRawSink.
437
+ class FormatRawSink {
438
+ public:
439
+ // Implicitly convert from any type that provides the hook function as
440
+ // described above.
441
+ template <typename T,
442
+ typename = typename std::enable_if<std::is_constructible<
443
+ str_format_internal::FormatRawSinkImpl, T*>::value>::type>
444
+ FormatRawSink(T* raw) // NOLINT
445
+ : sink_(raw) {}
446
+
447
+ private:
448
+ friend str_format_internal::FormatRawSinkImpl;
449
+ str_format_internal::FormatRawSinkImpl sink_;
450
+ };
451
+
452
+ // Format()
453
+ //
454
+ // Writes a formatted string to an arbitrary sink object (implementing the
455
+ // `absl::FormatRawSink` interface), using a format string and zero or more
456
+ // additional arguments.
457
+ //
458
+ // By default, `std::string` and `std::ostream` are supported as destination
459
+ // objects. If a `std::string` is used the formatted string is appended to it.
460
+ //
461
+ // `absl::Format()` is a generic version of `absl::StrFormat(), for custom
462
+ // sinks. The format string, like format strings for `StrFormat()`, is checked
463
+ // at compile-time.
464
+ //
465
+ // On failure, this function returns `false` and the state of the sink is
466
+ // unspecified.
467
+ template <typename... Args>
468
+ bool Format(FormatRawSink raw_sink, const FormatSpec<Args...>& format,
469
+ const Args&... args) {
470
+ return str_format_internal::FormatUntyped(
471
+ str_format_internal::FormatRawSinkImpl::Extract(raw_sink),
472
+ str_format_internal::UntypedFormatSpecImpl::Extract(format),
473
+ {str_format_internal::FormatArgImpl(args)...});
474
+ }
475
+
476
+ // FormatArg
477
+ //
478
+ // A type-erased handle to a format argument specifically used as an argument to
479
+ // `FormatUntyped()`. You may construct `FormatArg` by passing
480
+ // reference-to-const of any printable type. `FormatArg` is both copyable and
481
+ // assignable. The source data must outlive the `FormatArg` instance. See
482
+ // example below.
483
+ //
484
+ using FormatArg = str_format_internal::FormatArgImpl;
485
+
486
+ // FormatUntyped()
487
+ //
488
+ // Writes a formatted string to an arbitrary sink object (implementing the
489
+ // `absl::FormatRawSink` interface), using an `UntypedFormatSpec` and zero or
490
+ // more additional arguments.
491
+ //
492
+ // This function acts as the most generic formatting function in the
493
+ // `str_format` library. The caller provides a raw sink, an unchecked format
494
+ // string, and (usually) a runtime specified list of arguments; no compile-time
495
+ // checking of formatting is performed within this function. As a result, a
496
+ // caller should check the return value to verify that no error occurred.
497
+ // On failure, this function returns `false` and the state of the sink is
498
+ // unspecified.
499
+ //
500
+ // The arguments are provided in an `absl::Span<const absl::FormatArg>`.
501
+ // Each `absl::FormatArg` object binds to a single argument and keeps a
502
+ // reference to it. The values used to create the `FormatArg` objects must
503
+ // outlive this function call. (See `str_format_arg.h` for information on
504
+ // the `FormatArg` class.)_
505
+ //
506
+ // Example:
507
+ //
508
+ // std::optional<std::string> FormatDynamic(
509
+ // const std::string& in_format,
510
+ // const vector<std::string>& in_args) {
511
+ // std::string out;
512
+ // std::vector<absl::FormatArg> args;
513
+ // for (const auto& v : in_args) {
514
+ // // It is important that 'v' is a reference to the objects in in_args.
515
+ // // The values we pass to FormatArg must outlive the call to
516
+ // // FormatUntyped.
517
+ // args.emplace_back(v);
518
+ // }
519
+ // absl::UntypedFormatSpec format(in_format);
520
+ // if (!absl::FormatUntyped(&out, format, args)) {
521
+ // return std::nullopt;
522
+ // }
523
+ // return std::move(out);
524
+ // }
525
+ //
526
+ ABSL_MUST_USE_RESULT inline bool FormatUntyped(
527
+ FormatRawSink raw_sink, const UntypedFormatSpec& format,
528
+ absl::Span<const FormatArg> args) {
529
+ return str_format_internal::FormatUntyped(
530
+ str_format_internal::FormatRawSinkImpl::Extract(raw_sink),
531
+ str_format_internal::UntypedFormatSpecImpl::Extract(format), args);
532
+ }
533
+
534
+ ABSL_NAMESPACE_END
535
+ } // namespace absl
536
+
537
+ #endif // ABSL_STRINGS_STR_FORMAT_H_