[CrOS PhoneHub] Implement SecureChannel protocol v4
WireMessage protocol v3 used an unsigned 16-bit integer to represent the message length. Unfortunately, when big messages are sent (e.g., images sent through Phone Hub), the size can exceed the maximum value of a 16-bit int, so the protocol breaks down. This CL introduces v4, which uses an unsigned 32-bit integer to represent the message size. For backward compatibility, we still use v3 to send messages used for authentication, Smart Lock, and Instant Tethering. If a message is sent for any other feature type, we use v4. Bug: 1150565, 1106937 Change-Id: I2e074505f8efa8a6a7ba355229e8cd0adf7e7c19 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2552250 Commit-Queue: Kyle Horimoto <khorimoto@chromium.org> Reviewed-by:James Vecore <vecore@google.com> Cr-Commit-Position: refs/heads/master@{#829896}
Showing
This diff is collapsed.
Please register or sign in to comment