52 lines
2.4 KiB
Plaintext
52 lines
2.4 KiB
Plaintext
Widevine Factory Extraction Tool
|
|
|
|
This tool extracts the BCC and generates the Certificate Signing Request (CSR)
|
|
needed to be uploaded for Prov4 device registration.
|
|
|
|
CSR extraction instructions:
|
|
|
|
1. Prepare the example_main.cpp file:
|
|
- Write or modify the main() function in example_main.cpp according to your
|
|
needs.
|
|
- Ensure that all required fields in the client_info structure are filled in
|
|
correctly. Refer to the comments within the main() function in
|
|
example_main.cpp for detailed instructions and field descriptions.
|
|
|
|
2. Compile:
|
|
- Option 1: Command-line compilation
|
|
- Under the directory factory_upload_tool/ce, run:
|
|
clang++ *.cpp ../common/src/*.cpp ../../util/src/string_conversions.cpp -ldl -rdynamic -I../../util/include -I../../oemcrypto/include -I../common/include -o wv_factory_extractor
|
|
This command compiles all .cpp files into an executable named
|
|
wv_factory_extractor in current directory.
|
|
- Option 2: Using the provided Makefile
|
|
- Under the directory factory_upload_tool/ce, run:
|
|
`make all`
|
|
- To enable the BCC validator, compile with:
|
|
`make USE_VALIDATOR=y all`
|
|
Note that the BCC validator takes dependency of `cppbor` and
|
|
`boringssl` library from `third_party` directory.
|
|
- The compiled executable will be located in the out/wv_factory_extractor
|
|
directory under the CDM root directory.
|
|
|
|
3. Specify the location of liboemcrypto.so:
|
|
- Replacing /path/to/ with the actual path to the liboemcrypto.so file:
|
|
export LIBOEMCRYPTO_PATH=/path/to/liboemcrypto.so
|
|
|
|
4. Run the wv_factory_extractor tool:
|
|
- To output the CSR to a file ready for uploading, under the output
|
|
directory, run
|
|
`./wv_factory_extractor > csr.json`
|
|
- To run BCC validation and view the results in console output, run
|
|
`./wv_factory_extractor --validate`
|
|
- If BCC validator is enabled at compile time, it will print the parsed BCC
|
|
and the validation results.
|
|
|
|
Uploading instructions:
|
|
|
|
1. Upload the `csr.json` file:
|
|
- Upload the `csr.json` file using the following command:
|
|
python3 upload.py --credentials=cred.json --org-name={your organization name} --json-csr=csr.json
|
|
- Replace cred.json with the path to your OAuth 2.0 client credentials
|
|
file. You can obtain this file through the Google Cloud Platform.
|
|
- Replace {your organization name} with the name of your organization.
|