Commit Graph

78 Commits

Author SHA1 Message Date
Alex Dale
39c12039cb Patch Android FileSystem::List for non-existing directory.
[ Merge of http://go/wvgerrit/210651 ]

The Android FileSystem implementation for List() would return an error
if the directory does not exist.  This creates an issue for the case
where the CDM attempts to list offline licenses after clearing all
data.  This typically won't effect a regular user, it causes
integration tests which re-provision to fail.

Bug: 372105842
Test: file_store_unittest on Oriole
Change-Id: I121b52ab95e36249ae5b196e987bc950a278131f
2024-11-21 14:41:20 -08:00
Alex Dale
b092b0e2f1 Cleaned up file_store_unittest.cpp
[ Merge of http://go/wvgerrit/209871 ]

The filestore unit tests have not been updated in a while, and
contained several test statements which could crash the test
when failed (accessing elements in a vector or characters in a
string without proper size checks).  Other parts of the tests
had non-obvious purposes without detailed knowledge of how the
file system works on the different platforms.

Significant parts of the tests have been refactored to include
better checking and to add error messages to explain the
expectations.  Several of the tests have been documented, and the
FileSystem header has been updated to explain what the API does.

Bug: 376533901
Test: file_store_unittest on Oriole
Change-Id: I5af9fd2a2ed01aa6186026761c9e0814604ec610
(cherry picked from commit bc4382b075)
2024-11-09 01:34:51 +00:00
Ian Benz
a0f6b99cbe Fix TestSleep integer overflows identified by Coverity
Change-Id: Ibbc218100ea8a58c201bc6812cabc88dfd16f36e
2024-02-01 13:40:52 -08:00
John "Juce" Bruce
c232299f78 Allow CE CDM integrators to specify their own logging
This patch adds a new interface that partners must provide to
Cdm::initialize(), ILogger. ILogger replaces stderr as the sink to which
logging messages are sent. For partners that still want to log to
stderr, a reference implementation that logs to stderr is provided.

As a side-effect of this, many test-related source files had to be
updated to thread the new parameter to Cdm::initialize() through them.
This also necessitated adding a new variant of FormatString() that can
be called with a va_list directly so it can be called from other
functions that take varargs.

Bug: 201446862
Merged from https://widevine-internal-review.googlesource.com/177270

Change-Id: Ie31a10162773883b337f3a6144cf180a2b100139
2024-02-01 13:40:52 -08:00
Fred Gylys-Colwell
b7b423aca3 Reduce clock skew in flaky duration tests
There are three changes here that should help reduce the
amount of duration test failures caused by clock skew.

First, we reported some skew when the test expected playback
to start immediately after loading the license. However,
with round-off, this could easily be more than 1 second. So
this does not warrent even a warning.

Second, the fake and real clocks were only synced after
computing how long to sleep. This is fixed by moving
SleepUntil to the TestSleep class and having it sync before
computing the delta and after doing the sleep.

Third, I am guessing that some failures due to unexpected
lenience were caused by the rental or playback clock being
started at the end of signing the license or the end of the
first decrypt instead of the beginning. We work around this
by recording how long these operations take, and then adding
this extra time at the end of the check for FailDecrypt.

Bug: 275003529
Bug: 279249646
Bug: 207500749
Merged from https://widevine-internal-review.googlesource.com/176070

Change-Id: I6a973565edfbebca53ee7f239b4b93f8f73d1e0a
2024-01-26 17:46:49 -08:00
Rahul Frias
9d1c9ca76a Add error details when offline license is not found
[ Merge of http://go/wvgerrit/171310 ]

Offline license not found errors are identified by CdmResponseEnum
347 (KEYSET_ID_NOT_FOUND_4). No addition file system information
is shared.

Checks for file existance use the stat command. The stat call can
return error codes from errno.h when the command fails.
These are now converted into sub error codes and returned along with
the offline license file not found error.

This also includes a change to log stat errors other than
ENOENT (no such file or directory) as a warning rather than verbose.

Bug: 276225520
Test: file_store_unittest, file_utils_unittest, GtsMediaTestCases
Change-Id: Ic09d036549582cd65783b49fa96ffefc4bf562c7
2023-04-28 02:38:35 -07:00
Alex Dale
de779e7545 Moved OEMCryptoResult string converter.
[ Merge of http://go/wvgerrit/170073 ]

Removed the file "error_string_util.cpp" and its header, moving the
OEMCryptoResult to string converter to "wv_cdm_types.cpp".  This extra
file served little purpose, and created a dependency on the CDM utils
to the CDM itself.

This is part of the effort to fix the formatting of WV metrics; making
enum-to-string conversion uniform throughout the CDM.

Bug: 239462891
Test: adb shell dumpsys android.hardware.drm.IDrmFactory/widevine -m
Test: Manual testing with Google TV
Change-Id: I4bf95d26b623f5b8fa86bdb2578cbc4ee65125cb
2023-04-11 14:08:30 -07:00
Rahul Frias
adf03c92f4 Address CDM compilation warnings for android
[ Merge of http://go/wvgerrit/169230 ]

Bug: 275675184
Test: Compile and GtsMediaTestCases
Change-Id: I3dc01f383a1fae07c126782e8d3561ab724316a8
2023-03-31 11:46:28 -07:00
Edwin Wong
6d3457b9d9 Remove hidl support.
Merged from http://go/wvgerrit/161857

Test: streaming(Netflix, Play Movies & TV)
Test: ./build_and_run_all_unit_tests.sh
Test: adb shell ps | grep drm
Test: metrics_dump
Test: hardware/interfaces/drm/aidl/vts$ atest VtsAidlHalDrmTargetTest

Bug: 259299992
Change-Id: I76bcc82bbfb3fc60987b66265a580946a16c341d
2022-11-22 19:03:30 +00:00
John "Juce" Bruce
ff73463d0b Add String Formatting Util
(Merged from http://go/wvgerrit/160042.)

Since we don't have access to std::format yet, this patch adds a
function to wvutil to format text into a std::string.

Bug: 255466913
Test: x86-64
Test: raven
Change-Id: I28043da76af5b4772a29fa7e7241343caf9b54a1
2022-11-15 05:24:19 +00:00
Edwin Wong
c70e3deb8b Output metrics in YAML format
Merge from http://go/wvgerrit/158917

Use go/yamllint as reference and obfuscate portion of output to
run on an online yaml validator.

Sample output: http://go/cl/481370906

Test: Netflix, Play TV and Movies, Youtube
Test: adb shell dumpsys android.hardware.drm.IDrmFactory/widevine
Test: ./build_and_run_all_unit_tests.sh

Bug: 239462891
Change-Id: I1abf1aa50aa25b97b1f6c10995c324d6de04d056
2022-11-03 19:50:27 +00:00
Alex Dale
6bc69d5005 Remove CORE_UTIL_EXPORT
[ Merge of http://go/wvgerrit/155070 ]

These functions are internal utilities and should not be exported from
our library.  IIRC, this was added to aid in Windows tests, but this is
no longer needed.

Bug: 236317198
Test: build_and_run_all_unit_tests.sh
Change-Id: I19beb35a15f0f87dc8f968e1dd5302aed9463e54
2022-08-19 14:38:55 -07:00
Alex Dale
a20ee5bc54 Update system time for OPK reboot tests
[ Merge of http://go/wvgerrit/154593 ]

This CL updates the initial time used for reboot tests to be
within the valid range used by OPK. Also, the fake clock is
now synced with every use of the TestHost's clock function.

Also, the OPK's system clock is no longer initialized to 0
because this caused some tests to set initial playback time
to 0. That broke code that assumed a time of 0 mean "never".

I also removed some log spam in the WTPI code.

Bug: 222353528
Bug: 236317198
Change-Id: Ibdbdb2440454b9cf561cd9ec65ca3e40cf5a8d93
2022-07-20 14:47:25 -07:00
Alex Dale
b9ad36763a Add flag to disable CDM logging
[ Merge of http://go/wvgerrit/151570 ]

Bug: 215590138
Bug: 236317198
Change-Id: I5e90d2813252ca5ff5d9ba62316e2ee5545c71bf
2022-06-17 19:10:34 -07:00
Edwin Wong
af5f57a46c Only use libbinder_ndk for aidl service.
[ Merged from http://go/wvgerrit/151169 ]

Test: Netflix and Google TV streaming and downloaded playback
Test: unit tests
Test: atest VtsAidlHalDrmTargetTest
Test: adb shell readelf -d /vendor/bin/hw/android.hardware.drm-service.widevine
Test: adb shell readelf -d /vendor/lib64/libwvaidl.so

Bug: 230791937
Change-Id: Ia60d9fc838bf228b40d99b076a837ae789fa2d03
2022-05-05 15:12:55 +00:00
Robert Shih
5a1d5e8837 WVCdm: no destroy global log buffer on exit
[ Merge of go/wvgerrit/149989 ]

Bug: 227848537
Change-Id: I9407b133654c20ddcd3c15404dd19b3719064e6e
Test: Irdeto monkey test
2022-04-26 16:57:13 +00:00
Rahul Frias
b448a70645 Fix jenkins/opk_optee after v17 merge
[ Merge of http://go/wvgerrit/145349 ]

- Remove wvcdm namespace from test_clock.cpp

Bug: 224375138
Test: GtsMediaTestCases on sunfish
Change-Id: I239b692fd2103bd3d0626a145e99fc688c446256
2022-03-16 01:37:07 -07:00
Rahul Frias
6cda6717a9 Reboot test: Initialize fake clock
[ Merge of http://go/wvgerrit/143630 ]

When we run a test with the fake clock, the clock had been initialized
to the current time, or to 0. This causes a problem for reboot tests
because the clock might go backwards over the reboot. With this
change, we monitor the clock at the end of one reboot pass and
initialize the clock for the next pass based on the previous value.

Bug: 26163469
Test: GtsMediaTestCases on sunfish
Change-Id: Ibd0024f963634382af70553fced38da6e1d857d2
2022-03-16 01:34:36 -07:00
Rahul Frias
520368cea2 Reboot test: save large files
[ Merge of http://go/wvgerrit/143629 ]

The standard b2a_hex only saves about 2k, so we need a special version
that can handle larger strings. This is needed because a license file
is about 7k.

Bug: 194342751
Test: GtsMediaTestCases on sunfish
Change-Id: I6a6ac3f8f4fa6d9cd8a0119fc64fc8f3cc5f3ae8
2022-03-16 01:34:12 -07:00
Edwin
6112060529 Ran google3 clang-format on cdm source.
Merge from http://go/wvgerrit/144969

Test: build
  m android.hardware.drm-service.widevine -j128

Test: atest VtsAidlHalDrmTargetTest

Bug: 216720425
Change-Id: Ie1872d2a48e3b3645853e9831816afecffac747f
2022-02-03 20:33:05 -08:00
Edwin
3c3da01d58 Use aidl interface for Widevine service.
The interface is defined in
hardware/interfaces/drm/aidl(http://go/ag/15329852).

Test: build
  m android.hardware.drm-service.widevine -j128

Test: build_and_run_all_unit_tests.sh
  for hidl tests

Test: atest VtsAidlHalDrmTargetTest

Test:   atest vts_treble_vintf_vendor_test:vts_treble_vintf_vendor_test.DeviceManifest/SingleManifestTest#ManifestAidlHalsServed/0 -- --abi x86_64

Bug: 200055138
Bug: 170964303
Change-Id: I5654d90d8a4b0bae4b4a78e79b27c1cafec36be7
2022-02-01 22:20:04 -08:00
Yohei Yukawa
a4d835af3a Revert "Use aidl interface for Widevine service."
This reverts commit 96a8ccd4a1.

Reason for revert:
Could break DeviceManifest/SingleManifestTest#ManifestAidlHalsServed

Bug: 200055138
Bug: 170964303
Bug: 217241995
Change-Id: I9c42df15defec428c9ef8c62439c63d4a603fee6
2022-01-31 22:01:25 +00:00
Edwin
96a8ccd4a1 Use aidl interface for Widevine service.
The interface is defined in
hardware/interfaces/drm/aidl(http://go/ag/15329852).

Test: build
  m android.hardware.drm-service.widevine -j128

Test: build_and_run_all_unit_tests.sh
  for hidl tests

Test: atest VtsAidlHalDrmTargetTest

Bug: 200055138
Bug: 170964303
Change-Id: If2f2a129914436ba5cef1c46f6cb9415e12c3d1c
2022-01-28 20:29:14 -08:00
Kyle Zhang
642965c678 Merge latest oemcrypto-v17 change
No-Typo-Check: Not related to this change.

Bug: 161477208
Change-Id: I99e4780f6855b7045aa0cd5a49c13d2d0d51ed64
2022-01-27 20:07:15 -08:00
John W. Bruce
921cc2c4a3 Fix -Wshorten-64-to-32 errors in string conversion code
(This is a merge of http://go/wvgerrit/134313.)

This patch fixes code that would trigger -Wshorten-64-to-32 by
implicitly narrowing a variable from 64 to 32 bits. There were two cases
of this in string_conversions.cpp:

* The implicit conversions in DecodeBase64Char() were made explicit,
  which required going through both a reinterpret_cast and a static_cast
  to express fully.

* a2b_hex() now uses size_t for the length, as it probably always should
  have.

Bug: 194971260
Test: x86-64 tests
Change-Id: Ib9715b8adecc104f1a056ab0ac5faa5be74e5e54
2021-10-21 20:04:59 +00:00
John W. Bruce
895d391121 Migrate tests to googletest 1.10+ API
(This is a cherry-pick of http://go/wvgerrit/135227 and
http://go/wvgerrit/135246 from the Widevine repo.)

Googletest has deprecated the TEST_CASE nomenclature in favor of the
International Software Testing Qualifications Board-compliant term
TEST_SUITE. See
https://google.github.io/googletest/primer.html#beware-of-the-nomenclature
for more info.

Bug: 156766290
Test: build_and_run_all_unit_tests.sh
Change-Id: Ib94d534d17677601c4c160eb6b8d4e4e07df85c9
2021-10-11 17:05:48 -07:00
Vicky Min
9278c909d3 Sync fake clock for nonce tests
Because the fake clock is getting out of sync with the real clock
for the nonce flood tests, add a call to TestSleep::SyncFakeClock()
in Clock::GetCurrentTime() to force a sync.

Merged from http://go/wvgerrit/133223

Test: duration_use_case_test and nonce flood tests on bonito
Bug: 198329759
Change-Id: Idfd92c6cc57750a52477189461220c682b302082
2021-09-09 17:05:28 +00:00
Rahul Frias
c21d40c68f Address CE CDM code review comments
Undoes a change to the buffer size from http://ag/13865723

Bug: 184813991
Test: WV unit/integration tests
Change-Id: I40cf786f149626ff65a3362020b3da859bb86159
2021-04-23 12:26:34 -07:00
Alex Dale
36dc9bb97b Extended Android file store error logs.
[ Merge of http://go/wvgerrit/120763 ]

This change introduces additional logging information for files and
file system operations on Android.

File reading and writing will attempt to make sense of |errno| and
log useful information.   In the event that the file must be closed,
the file stat will be printed.

Failures in determining the file size will print potential reasons for
the encountered error.

This partly restructures the File interface implementation to use file
descriptors instead of the C standard libraries FILE handle.  This is
done to ensure that |errno| is set to an expected value.

This change also introduces the utility functions SafeWrite() and
SafeRead() to handle common, retriable errors.

Bug: 178232354
Test: Android MediaDrm GTS and Android file-based unittests
Change-Id: I15a3c47a271098c9edb4bd9f619ed1a12dca6143
2021-04-09 14:23:24 -07:00
Alex Dale
e189968a16 Merge "Base64 encoding for string input." into sc-dev 2021-03-26 05:18:43 +00:00
Alex Dale
e51f869190 Base64 encoding for string input.
[ Merge of http://go/wvgerrit/119805 ]

This change adds 3 new functions for encoding binary data from a C++
string to a base64 encoded ASCII string.

The CDM and protobuf generated code use C++ strings to store binary
data.  These binary strings are commonly converted into a base64
encoded ASCII string for logging and for returning to the app.

This change also cleans up some of the internal components of the
string_conversions library to use several standard library C++11
method.

Bug: 181732604
Test: CE CDM unittests
Change-Id: I547568c6402e011344260f2df2a06e972122ab8a
2021-03-23 14:49:46 -07:00
Rahul Frias
615a1e9f64 Have system clocks return wall time
[ Merge of http://go/wvgerrit/120445 ]

Switch TestHost and FakeClock to use chrono::system_clock (wall time)
rather than chrono::steady_clock (ticks since boot time).

Bug: 183160800
Test: CE CDM tests
Change-Id: I6ef4c02c01ff96453847ee8f42e6037c298866b5
2021-03-21 13:34:05 -07:00
Rahul Frias
c586f7e62b Merge changes from topic "b169740403_2" into sc-dev
* changes:
  Verify DRM certificate validity
  Extract creation and expiration times from DRM cert
  Allow two DRM certificates for each identifier
2021-03-19 21:26:33 +00:00
Rahul Frias
b21be96b1b Verify DRM certificate validity
[ Merge of http://go/wvgerrit/120123 ]

DRM certificate creation and expiration times are now validated.

* New DRM (default) certificates will have an expiration time specified
by the provisioning service.

When stored, the client will include the time the certificate was
received. This allows for expiration calculation to occur when client
and provisioning service clocks are out of sync.

When read out, creation, expiration and acquisition times are
validated. The certificate is checked for expiry by making sure
that the time at the client since the license was acquired is not
greater than the expiration period. The time information stored at the
client may be tampered with. The license service will perform an
expiration check and reject the license request if tampered with.
The expiration time may be set to never expires/unlimited. This is not
a valid value for creation or acquisition time.

* Pre-existing (legacy) certificates from upgrading devices will not
have an expiration time set by the provisioning service. Instead
the client will calculate an expiration time 6 months with + or -
a random two month period in the future. This is stored along with the
certificate.

When read out, if no expiration time has been set by the client, one
will be calculated and written out. The certificate will be declared as
valid. If a client calculated expiration time is present, the
certificate will be validated. In case of tampering, the license service
can reject license requests and force reprovisioning when appropriate.

* ATSC certificates will continue to not have an expiration time.
No additional validation is required.

Other changes for non-ATSC licenses involve managing both default and
legacy certificate co-existance. When checking for DRM certificates,
the default certificate is attempted first. This is followed by a check
for the legacy certificate, if the default certificate is not present.

Bug: 169740403
Test: WV unit/integration tests
      DeviceFilesTest.StoreCertificateInvalidParams
      DeviceFilesTest.RetrieveAtscCertificate
      DeviceFilesTest.RetrieveAtscCertificateNotFound
      DeviceFilesTest.RetrieveCertificateInvalidParams
      DeviceFilesTest.RetrieveLegacyCertificateWithoutExpirationTime
      DeviceFilesTest.RetrieveLegacyCertificateWithClientExpirationTime
      DeviceFilesTest.RetrieveLegacyExpiredCertificateByClientExpirationTime
      DeviceFilesTest.RetrieveLegacyCertificateInvalidClientExpirationTime
      DeviceFilesTest.RetrieveCertificateWithoutKeyType
      DeviceFilesTest.RetrieveDefaultCertificate
      DeviceFilesTest.RetrieveDefaultCertificateNeverExpires
      DeviceFilesTest.HasCertificateAtsc
      DeviceFilesTest.HasCertificateDefault
      DeviceFilesTest.HasCertificateLegacy
      DeviceFilesTest.HasCertificateNone
      CertificateTest.StoreCertificateTest.DefaultAndLegacy/*
      CertificateTest.RetrieveLegacyCertificateTest.ErrorScenarios/*
      CertificateTest.RetrieveDefaultCertificateTest.ErrorScenarios/*

Change-Id: I7dbec7555fbd493c1ec61c6bb5d9428a2405b1fd
2021-03-19 02:49:20 -07:00
TreeHugger Robot
640e8727dc Merge "Annotate fallthrough in OEC Testbed" into sc-dev 2021-03-19 07:41:24 +00:00
Rahul Frias
3b15087627 Allow two DRM certificates for each identifier
[ Merge of http://go/wvgerrit/119684 ]

This allows for a default DRM certificate that includes an expiration
time and a legacy one without for each app+origin specific identifier.
Existing offline licenses/secure stops are not associated with a
certificate, and so we cannot delete legacy certificates even after
fetching a new one. New offline licenses/secure stops will be associated
with certificate information, so we will not have this problem going
forward.

Bug: 169740403
Test: WV unit/integration tests
Change-Id: I0f08f6bf98775fd43927243dc4a9f75f21bfbbcc
2021-03-18 23:58:46 -07:00
TreeHugger Robot
9f574be636 Merge "Log license request and response" into sc-dev 2021-03-18 23:27:33 +00:00
Rahul Frias
edf9ad5b90 Correct test data member name
[ Merge of http://go/wvgerrit/119645 ]

Bug: 169740403
Test: WV unit/integration tests
Change-Id: I2a3e82869e3a45112e8b15eea4ac668980c3eb4d
2021-03-16 13:29:30 -07:00
Rahul Frias
a828bf5f58 Annotate fallthrough in OEC Testbed
[ Merge of http://go/wvgerrit/119230 ]

This patch adds an annotation to the one place in the codebase where we
intentionally fall through between switch statement cases, in order to
appease stricter compilers.

Bug: 182058081
Test: compile, WV unit/integration tests
Change-Id: I004a6a6e61681fcf22c6bf25d9b0284b8b64e776
2021-03-12 00:58:52 -08:00
Rahul Frias
094fabed5a Address compilation warnings
[ Merge of http://go/wvgerrit/119523 ]

Bug: 182299187
Test: compile vendor/widevine/libwvdrmengine
Change-Id: I39d1b62a3237bfb9163a7e157b871f22e3fec394
2021-03-10 18:49:57 -08:00
Rahul Frias
b8049e1f20 Log license request and response
[ Merge of http://go/wvgerrit/119563 ]

This also increases the max log size from 1024 to 5120

Bug: 181642154
Test: WV unit/integration tests
Change-Id: Ifae90354dad1165f4d9fa3c9fe33a4dc14df1270
2021-03-10 17:58:15 -08:00
Rahul Frias
a9f051faac Fix test sleep on iOS.
[ Merge of http://go/wvgerrit/117203 ]

clock_settime isn't available on iOS (even though settimeofday is).  But
we can't change the system time on iOS anyway, so this just disallows
iOS.

Bug: 182058081
Test: WV unit/integration tests
Change-Id: I96e5b6634803bd4e6aaf5cc6d64f4441296247d4
2021-03-08 15:28:48 -08:00
Rahul Frias
9a659e31c1 Restrict a2b_hex to 2000 bytes.
[ Merge of http://go/wvgerrit/109144 ]

Because it doesn't help anybody when a buffer overflow test chokes the
logger.

Bug: 182058081
Test: Ran unit tests with verbose logging
Change-Id: Ibcb3379b9eb9bdd94a8959b977e8de32ea116859
2021-03-08 15:27:01 -08:00
Rahul Frias
24e4c33262 Fix deprecated and printf warnings.
[ Merge of http://go/wvgerrit/118703 ]

Bug: 182058081
Test: WV unit/integration tests
Change-Id: I2d8995b8aab864a2d2f5161d12a473d34e67bad4
2021-03-08 15:22:56 -08:00
Robert Shih
7cb52c1ccf wvcdm: filter logs by app uid
This commit is a combination of the following:
* http://go/wvgerrit/117003
* http://go/wvgerrit/118303

Bug: 162255728
Test: MediaDrmTest#testGetLogMessages
Change-Id: I5699b64d5c4bab463e5b587595fa7d324dc1d93f
2021-03-01 11:56:37 -08:00
Robert Shih
89b9cb2706 Run git-clang-format on log.{h,cpp}
Bug: 168341163
Test: build
Change-Id: Ie51b1d4ab66e256992b6fffa524331ec124e047d
2021-02-16 00:39:43 -08:00
Robert Shih
83ef9081d1 Save recent Widevine CDM logs
Bug: 162255728
Test: cdm unit tests
Change-Id: Ibc0daf374bedd8ac2a9a0515835e2775045962a7
2021-02-04 05:12:09 +00:00
Rahul Frias
99938c3a36 Fix Format String Signedness
[ Merge of http://go/wvgerrit/110165 ]

The conditional compilation for flagging the CDM and ODKiTEE logging
functions as printf-like was guarded by a check on "__gnuc__" or
"__clang__". However, GCC doesn't actually define "__gnuc__", it
defines "__GNUC__", all caps. Fixing this causes GCC to find a slew
of format-string errors that Clang was accepting. This patch fixes the
capitalization and the uncovered errors, most of which fall into one of
a few categories:

1) The format string and variable had different signedness. For these,
   the format strings are updated to match the variables.
2) The variable was an array index that was not of size_t. For these,
   the variables have been updated to be size_t and the format strings
   have been updated to use %zu. A few index variables that weren't
   actually used in format strings are also fixed to be size_t.
3) The code assumed the signedness of the internal representation of an
   integer literal, enum constant, or enum variable. For these, I either
   cast the input to a known type so that the format string is valid
   regardless of internal representation or I switched to a hexadecimal
   format string. The latter case is more useful on ODKiTEE enums where
   the literal value is in the code as a 32-bit hexadecimal value
   anyway.

This patch also adds missing integer casts to the enum literals in the
ODKiTEE logging header. (These are required for pedantic C99
compatibility when using literal values that do not fit into a 16-bit
integer.)

Bug: 173460694
Test: jenkins/odkitee_ta
Test: build.py x86-64
Change-Id: I244972639a5a6ea0de157eb67e1e0dfa9787ec32
2020-11-27 03:50:40 -08:00
Rahul Frias
53019f0459 Update Widevine Copyright header
[ Merge of http://go/wvgerrit/108103 ]

The Widevine License Agreement has been renamed to use inclusive
language. This covers files in the cdm, linux, platform, util directory
in addition to some other files.

Bug: 168562298
Test: verified compilation (comment only change)
Change-Id: I9a4977fd4c2ad951769b6be84263f81bd0f22678
2020-10-21 12:54:20 -07:00
Rahul Frias
ec8bed38f4 Update Widevine Copyright header for android
[ Merge of http://go/wvgerrit/108084 ]

The Widevine License Agreement has been renamed to use inclusive
language. This covers files in the android directory.

Bug: 168562298
Test: verified compilation (comment only change)
Change-Id: I0f9e6445e0168ebe85425baeb81371e182e5a39c
2020-10-21 02:49:05 -07:00