Source release 19.5.0

This commit is contained in:
Cong Lin
2025-04-02 10:27:18 -07:00
parent 4407acee62
commit f7ec4fdeff
295 changed files with 32196 additions and 21748 deletions

View File

@@ -1,10 +1,51 @@
Instructions:
1. Write the main function or modify the example main function in example_main.cpp
2. To compile the example_main:
clang++ *.cpp ../common/src/*.cpp ../../util/src/string_conversions.cpp -ldl -rdynamic -I../../util/include -I../../oemcrypto/include -I../common/include -o example_main.out
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:
export LIBOEMCRYPTO_PATH=/path/to/liboemcrypto.so
4. Run the main program to extract the BCC and save it to a file.
./example_main.out > csr.bin
5. Upload the csr.bin with the following command. cred.json is the OAuth 2.0 client credentials obtained via Google cloud platform.
python3 upload.py --credentials=cred.json --org-name={your organization name} --json-csr=csr.bin
- 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.