Switch content/browser/web_package to parse b2 format, and deprecate b1 format.
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/0e992a784aeda624fa9fdae2d7c94608728b993b commit 0e992a784aeda624fa9fdae2d7c94608728b993b Author: Kouhei Ueno <kouhei@chromium.org> Date: Fri Aug 24 08:10:03 2018 SignedExchange: Switch to b2 format parser. Before this CL, Signed Exchange parser implementation in Chromium expected the b1 format [spec-b1]. This CL switches the parser implementation to expect the updated specification which we will snapshot as the b2 format in near future, and deprecate support for parsing the b1 format. Overview: - The magic strings and version specifiers are changed from b1 -> b2. - RequestUrl was a part of cbor_headers in b1, but is now located in the prologue section. - As a result, SignedExchangePrologue is now split into two: {BeforeFallbackUrl, FallbackUrlAndAfter} - Signature message bytes are now encoded using custom binary format (was CBOR in b1) - cbor_headers no longer go through enc(dec(original_bytes)), fixes crbug.com/863499 Note: fallbackUrl redirect on parse fail ( crbug.com/874323 ) is to be addressed in separate CL. [spec-b1] https://tools.ietf.org/html/draft-yasskin-httpbis-origin-signed-exchanges-impl-01 Bug: 803774, 863499 , 876968 Change-Id: Ib172411e075472dcaae21af9c7460af5b5cf4e52 Reviewed-on: https://chromium-review.googlesource.com/1183053 Commit-Queue: Kouhei Ueno <kouhei@chromium.org> Reviewed-by: Kinuko Yasuda <kinuko@chromium.org> Reviewed-by: Kent Tamura <tkent@chromium.org> Reviewed-by: Kunihiko Sakamoto <ksakamoto@chromium.org> Cr-Commit-Position: refs/heads/master@{#585754} [modify] https://crrev.com/0e992a784aeda624fa9fdae2d7c94608728b993b/content/browser/web_package/signed_exchange_cert_fetcher_unittest.cc [modify] https://crrev.com/0e992a784aeda624fa9fdae2d7c94608728b993b/content/browser/web_package/signed_exchange_certificate_chain.cc [modify] https://crrev.com/0e992a784aeda624fa9fdae2d7c94608728b993b/content/browser/web_package/signed_exchange_certificate_chain_fuzzer.cc [modify] https://crrev.com/0e992a784aeda624fa9fdae2d7c94608728b993b/content/browser/web_package/signed_exchange_certificate_chain_unittest.cc [modify] https://crrev.com/0e992a784aeda624fa9fdae2d7c94608728b993b/content/browser/web_package/signed_exchange_consts.h [modify] https://crrev.com/0e992a784aeda624fa9fdae2d7c94608728b993b/content/browser/web_package/signed_exchange_envelope.cc [modify] https://crrev.com/0e992a784aeda624fa9fdae2d7c94608728b993b/content/browser/web_package/signed_exchange_envelope.h [modify] https://crrev.com/0e992a784aeda624fa9fdae2d7c94608728b993b/content/browser/web_package/signed_exchange_envelope_unittest.cc [modify] https://crrev.com/0e992a784aeda624fa9fdae2d7c94608728b993b/content/browser/web_package/signed_exchange_handler.cc [modify] https://crrev.com/0e992a784aeda624fa9fdae2d7c94608728b993b/content/browser/web_package/signed_exchange_handler.h [modify] https://crrev.com/0e992a784aeda624fa9fdae2d7c94608728b993b/content/browser/web_package/signed_exchange_handler_unittest.cc [modify] https://crrev.com/0e992a784aeda624fa9fdae2d7c94608728b993b/content/browser/web_package/signed_exchange_prologue.cc [modify] https://crrev.com/0e992a784aeda624fa9fdae2d7c94608728b993b/content/browser/web_package/signed_exchange_prologue.h [modify] https://crrev.com/0e992a784aeda624fa9fdae2d7c94608728b993b/content/browser/web_package/signed_exchange_prologue_unittest.cc [modify] https://crrev.com/0e992a784aeda624fa9fdae2d7c94608728b993b/content/browser/web_package/signed_exchange_request_handler_browsertest.cc [modify] https://crrev.com/0e992a784aeda624fa9fdae2d7c94608728b993b/content/browser/web_package/signed_exchange_signature_header_field.cc [modify] https://crrev.com/0e992a784aeda624fa9fdae2d7c94608728b993b/content/browser/web_package/signed_exchange_signature_header_field_unittest.cc [modify] https://crrev.com/0e992a784aeda624fa9fdae2d7c94608728b993b/content/browser/web_package/signed_exchange_signature_verifier.cc [modify] https://crrev.com/0e992a784aeda624fa9fdae2d7c94608728b993b/content/browser/web_package/signed_exchange_signature_verifier_unittest.cc [modify] https://crrev.com/0e992a784aeda624fa9fdae2d7c94608728b993b/content/test/data/sxg/generate-test-sxgs.sh [modify] https://crrev.com/0e992a784aeda624fa9fdae2d7c94608728b993b/content/test/data/sxg/test.example.com_invalid_test.sxg [modify] https://crrev.com/0e992a784aeda624fa9fdae2d7c94608728b993b/content/test/data/sxg/test.example.com_invalid_test.sxg.mock-http-headers [modify] https://crrev.com/0e992a784aeda624fa9fdae2d7c94608728b993b/content/test/data/sxg/test.example.org_hello.txt.sxg [modify] https://crrev.com/0e992a784aeda624fa9fdae2d7c94608728b993b/content/test/data/sxg/test.example.org_noext_test.sxg [modify] https://crrev.com/0e992a784aeda624fa9fdae2d7c94608728b993b/content/test/data/sxg/test.example.org_test.sxg [modify] https://crrev.com/0e992a784aeda624fa9fdae2d7c94608728b993b/content/test/data/sxg/test.example.org_test.sxg.mock-http-headers [modify] https://crrev.com/0e992a784aeda624fa9fdae2d7c94608728b993b/content/test/fuzzer/signed_exchange_envelope_fuzzer.cc [modify] https://crrev.com/0e992a784aeda624fa9fdae2d7c94608728b993b/third_party/WebKit/LayoutTests/http/tests/loading/sxg/resources/fallback-to-another-sxg.sxg [modify] https://crrev.com/0e992a784aeda624fa9fdae2d7c94608728b993b/third_party/WebKit/LayoutTests/http/tests/loading/sxg/resources/generate-test-sxgs.sh [modify] https://crrev.com/0e992a784aeda624fa9fdae2d7c94608728b993b/third_party/WebKit/LayoutTests/http/tests/loading/sxg/resources/sxg-cert-not-found.sxg [modify] https://crrev.com/0e992a784aeda624fa9fdae2d7c94608728b993b/third_party/WebKit/LayoutTests/http/tests/loading/sxg/resources/sxg-invalid-validity-url.sxg [modify] https://crrev.com/0e992a784aeda624fa9fdae2d7c94608728b993b/third_party/WebKit/LayoutTests/http/tests/loading/sxg/resources/sxg-location-origin-trial.php [modify] https://crrev.com/0e992a784aeda624fa9fdae2d7c94608728b993b/third_party/WebKit/LayoutTests/http/tests/loading/sxg/resources/sxg-location.sxg [modify] https://crrev.com/0e992a784aeda624fa9fdae2d7c94608728b993b/third_party/blink/tools/apache_config/mime.types
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/03168d86dfe524a9e90f38fb27f3b5f01c29eded commit 03168d86dfe524a9e90f38fb27f3b5f01c29eded Author: Kunihiko Sakamoto <ksakamoto@chromium.org> Date: Fri Aug 24 09:05:35 2018 Update sxg version of prefetch accept: header to b2 and add a link to the mime-type definition. Bug: 874752 , 876968 Change-Id: I63be125a714e716fa83becc23e812db453fa1a9d Reviewed-on: https://chromium-review.googlesource.com/1188163 Reviewed-by: Yoav Weiss <yoav@yoav.ws> Reviewed-by: Kouhei Ueno <kouhei@chromium.org> Reviewed-by: Kinuko Yasuda <kinuko@chromium.org> Commit-Queue: Kunihiko Sakamoto <ksakamoto@chromium.org> Cr-Commit-Position: refs/heads/master@{#585770} [modify] https://crrev.com/03168d86dfe524a9e90f38fb27f3b5f01c29eded/content/browser/loader/prefetch_browsertest.cc [modify] https://crrev.com/03168d86dfe524a9e90f38fb27f3b5f01c29eded/third_party/blink/renderer/core/loader/link_loader.cc
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/eef241f6fdf6b7b93f4617cea1ea2f43abf0b3af commit eef241f6fdf6b7b93f4617cea1ea2f43abf0b3af Author: Kouhei Ueno <kouhei@chromium.org> Date: Tue Aug 28 02:50:11 2018 SignedExchange: Extract fallbackUrl and redirect for sxgs which magic string are invalid. Before this CL, SignedExchangeHandler aborted parsing immediately when the stream did not have correct magic string. After this CL, SignedExchangeHandler will not stop parsing on invalid magic string, and attempt to extract fallbackUrl. With this change, navigating to a sxg with invalid magic string will redirect to its fallbackUrl as long as it is valid. Bug: 803774, 874323 , 876968 Change-Id: Ib903854f0a80437acd05e1fa6b9e71b759aa4c35 Reviewed-on: https://chromium-review.googlesource.com/1187855 Commit-Queue: Kouhei Ueno <kouhei@chromium.org> Reviewed-by: Kunihiko Sakamoto <ksakamoto@chromium.org> Reviewed-by: Kinuko Yasuda <kinuko@chromium.org> Cr-Commit-Position: refs/heads/master@{#586555} [modify] https://crrev.com/eef241f6fdf6b7b93f4617cea1ea2f43abf0b3af/content/browser/web_package/signed_exchange_handler.cc [modify] https://crrev.com/eef241f6fdf6b7b93f4617cea1ea2f43abf0b3af/content/browser/web_package/signed_exchange_handler.h [modify] https://crrev.com/eef241f6fdf6b7b93f4617cea1ea2f43abf0b3af/content/browser/web_package/signed_exchange_loader.cc [modify] https://crrev.com/eef241f6fdf6b7b93f4617cea1ea2f43abf0b3af/content/browser/web_package/signed_exchange_request_handler_browsertest.cc [modify] https://crrev.com/eef241f6fdf6b7b93f4617cea1ea2f43abf0b3af/content/test/data/sxg/generate-test-sxgs.sh [add] https://crrev.com/eef241f6fdf6b7b93f4617cea1ea2f43abf0b3af/content/test/data/sxg/test.example.org_test_invalid_magic_string.sxg [add] https://crrev.com/eef241f6fdf6b7b93f4617cea1ea2f43abf0b3af/content/test/data/sxg/test.example.org_test_invalid_magic_string.sxg.mock-http-headers [modify] https://crrev.com/eef241f6fdf6b7b93f4617cea1ea2f43abf0b3af/third_party/WebKit/LayoutTests/http/tests/loading/sxg/sxg-invalid-validity-url.html [add] https://crrev.com/eef241f6fdf6b7b93f4617cea1ea2f43abf0b3af/third_party/WebKit/LayoutTests/virtual/sxg-origin-trial-with-network-service/http/tests/loading/sxg/sxg-invalid-validity-url-expected.txt [add] https://crrev.com/eef241f6fdf6b7b93f4617cea1ea2f43abf0b3af/third_party/WebKit/LayoutTests/virtual/sxg-origin-trial/http/tests/loading/sxg/sxg-invalid-validity-url-expected.txt
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/44900507c9c66d312f17f0d908f51e32f0e4c186 commit 44900507c9c66d312f17f0d908f51e32f0e4c186 Author: Kunihiko Sakamoto <ksakamoto@chromium.org> Date: Tue Aug 28 06:15:15 2018 SignedExchange: Fallback redirect on unsupported versions of content-type Before this CL, SignedExchangeHandler did not parse signed exchanges when the v= parameter of content type was invalid. After this CL, SignedExchangeHandler will parse the signed exchange prologue even if content type indicates an unsupported version, and will redirect to the sxg's fallbackUrl as long as it is valid. Bug: 803774, 874323 , 876968 Change-Id: I7f890f439c25b8591f0d741fa6257282f791cdf1 Reviewed-on: https://chromium-review.googlesource.com/1192472 Reviewed-by: Kouhei Ueno <kouhei@chromium.org> Commit-Queue: Kunihiko Sakamoto <ksakamoto@chromium.org> Cr-Commit-Position: refs/heads/master@{#586594} [modify] https://crrev.com/44900507c9c66d312f17f0d908f51e32f0e4c186/content/browser/web_package/signed_exchange_handler.cc [modify] https://crrev.com/44900507c9c66d312f17f0d908f51e32f0e4c186/content/browser/web_package/signed_exchange_request_handler_browsertest.cc [modify] https://crrev.com/44900507c9c66d312f17f0d908f51e32f0e4c186/content/test/data/sxg/generate-test-sxgs.sh [modify] https://crrev.com/44900507c9c66d312f17f0d908f51e32f0e4c186/content/test/data/sxg/test.example.org_test_invalid_content_type.sxg
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/bef96cf05dc51895d44ee50a7792a6692a915dbc commit bef96cf05dc51895d44ee50a7792a6692a915dbc Author: Kunihiko Sakamoto <ksakamoto@chromium.org> Date: Fri Sep 21 05:11:45 2018 SignedExchangeSignatureVerifier: Remove b1 functions Bug: 876968 Change-Id: Iae1f26e63a4c607b68f6cb85d2d46594a682a27c Reviewed-on: https://chromium-review.googlesource.com/1237793 Reviewed-by: Kouhei Ueno <kouhei@chromium.org> Commit-Queue: Kunihiko Sakamoto <ksakamoto@chromium.org> Cr-Commit-Position: refs/heads/master@{#593081} [modify] https://crrev.com/bef96cf05dc51895d44ee50a7792a6692a915dbc/content/browser/web_package/signed_exchange_signature_verifier.cc [modify] https://crrev.com/bef96cf05dc51895d44ee50a7792a6692a915dbc/content/browser/web_package/signed_exchange_signature_verifier.h [modify] https://crrev.com/bef96cf05dc51895d44ee50a7792a6692a915dbc/content/browser/web_package/signed_exchange_signature_verifier_unittest.cc
Comment 1 by bugdroid1@chromium.org
, Aug 24