(This is a merge from the Widevine repo of http://go/wvgerrit/131084.)
This patch updates the OEM Certificate scripts to work in Python 3.
Previously, the scripts were nominally Python-2-only, though I actually
couldn't get them to run in either Python 2 or 3. The following changes
were necessary to make the scripts work in Python 3:
1) print() is now a function, not a keyword.
2) xrange() is now range().
3) StringIO is now part of the io package.
4) Python 3 no longer lets you mix strings and byte buffers
indiscriminately. As such, the code needed to be made more crisp
about when it is treating a file or other blob of data as binary vs.
text. Many instances of StringIO had to become BytesIO, and several
literals had to be turned into byte literals. Passphrase command-line
parameters are now parsed to UTF-8 bytes during argument parsing.
Bug: 151736642
Test: oem_certificate_test.py
Change-Id: I8ea5d0fda2ea5a2c0289be7612be0b4e508c4abf
[ Merge of http://go/wvgerrit/71204 ]
- Also renames oem_certificate_generator_help to
oem_certificate_generator_test_helper to better reflect what it is.
- Use PKCS7_DETACHED instead of PKCS7_PARTIAL.
Bug: 122610083.
Test: WV unit/integration tests
Change-Id: Iee84598512cafb6092a857da1582c741c6ee7693
Merge from Widevine repo of http://go/wvgerrit/26880
and http://go/wvgerrit/26062
Deliver oem_certificate_generator
b/37996004
Testing: Tool delivery only
Change-Id: Id95bd3cdd7cf5b48d225624747ab1f8499e4f438