Update the test to support license protocol 2.2

- Add a flag ENABLE_LICENSE_PROTOCOL_2_2, when the flag is enabled
  - Hash the license request in WB_License_ProcessLicenseResponse, i.e.
    the request used for the key derivation, which ensures the key
    derivation message to be a string of constant size 64 bytes.
  - Hash the license request in WB_License_SignLicenseRequest. Note that
    the function takes license request (or hashed) + odk message as
    parameter for odk v17 or above.
- Enable the flag just for Chrome and ChromeOS for now.

We may change the implementation to hash inside the white-box in the
future.

Also included a few other misc changes, e.g. updating the DEPS of
boringssl and googletest which are already in the white-box directory,
adding a test main etc.
This commit is contained in:
KongQun Yang
2023-03-29 19:19:52 +00:00
parent 317916385a
commit d6ef4e1133
13 changed files with 185 additions and 17 deletions

View File

@@ -27,13 +27,13 @@ git_repository(
git_repository(
name = "boringssl_repo",
commit = "14164f6fef47b7ebd97cdb0cea1624eabd6fe6b8", # 2018-11-26
commit = "d345d68d5c4b5471290ebe13f090f1fd5b7e8f58", # 2022-09-14
remote = "https://github.com/google/boringssl.git",
)
git_repository(
name = "googletest_repo",
commit = "b6cd405286ed8635ece71c72f118e659f4ade3fb", # 2019-01-04
commit = "b796f7d44681514f58a683a3a71ff17c94edb0c1", # 2023-01-17
remote = "https://github.com/google/googletest.git",
)
@@ -57,16 +57,16 @@ git_repository(
http_archive(
name = "zlib",
build_file = "@com_google_protobuf//:third_party/zlib.BUILD",
sha256 = "c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1",
strip_prefix = "zlib-1.2.11",
urls = ["https://zlib.net/zlib-1.2.11.tar.gz"],
sha256 = "b3a24de97a8fdbc835b9833169501030b8977031bcb54b3b3ac13740f846ab30",
strip_prefix = "zlib-1.2.13",
urls = ["https://zlib.net/zlib-1.2.13.tar.gz"],
)
# ODK
new_git_repository(
name = "odk_repo",
build_file = "@whitebox_api//external:odk.BUILD",
commit = "c1401c6a1cc6a4378b6aa3d1c3d3f1f58278616e",
commit = "2bfd670424232fbff4e38f25d06cb28ee4c88b61", # 17.1
remote = "https://widevine-partner.googlesource.com/oemcrypto_core_message.git",
repo_mapping = {"@whitebox" : "@whitebox_api"}
)
@@ -104,4 +104,4 @@ bind(
bind(
name = "odk",
actual = "@odk_repo//:odk",
)
)