Commit Graph

11 Commits

Author SHA1 Message Date
Lu Chen
77b2fcc678 Decouple key fetcher; Update ECMG API 2020-02-11 18:08:06 -08:00
Lu Chen
ac564bb46f Update includes and BUILD 2020-02-05 11:21:51 -08:00
Fang Yu
c20687acf3 1) Do not use gflags in the example binary code.
2) Also surface wv_cas_key_fetcher_example to partner.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=229965302
2019-01-18 11:43:12 -08:00
Fang Yu
e7173c82cd 1) Change return type to WvCasStatus for functions in wv_cas_types.cc.
2) Add a binary wv_cas_types_example.
3) Surface wv_cas_key_fetcher *source code* to partner to serve as an example of how they would make a HTTP request to acquire an entitlement key from license server.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=229953562
2019-01-18 10:41:13 -08:00
Fang Yu
fb96918196 Print uint16 as \x01 not \x1
-------------
Allow the usage of different entitlement keys to wrap even vs. odd key.

-------------
(1) Change parameter type from 'string' to 'const char* const' to handle possible '\x00' (Nul char) byte in the input.
(2) Check size of generated ECM string, return error if the size is not as expected.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=220172089
2018-11-05 14:26:39 -08:00
Fang Yu
581ae9080d Be clear it is DVB_CSA2 we are supporting right now. There shouldn't be anyone using DVB_CSA anymore, DVB_CSA3 is in the future.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=219867168
2018-11-02 16:23:11 -07:00
Fang Yu
0441c0b8d4 Add a few more checks for "key length" and "iv length".
-------------
Pad key value when crypto_mode is DVB_CSA, so that the key length is always 16 bytes.

-------------
Minor comment and example code update.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=219860612
2018-11-02 14:23:38 -07:00
Fang Yu
5ac3c5a95b (1) Move the CryptoMode enum definition to media_cas_packager_sdk partners can use it when calling libraries in the SDK.
(2) Add a new enum value for kDvbCsa.
(3) Allow caller to specify CTR, CBC, as well as CSA when using the ecm genertor from the SDK.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=219707788
2018-11-01 15:24:51 -07:00
Fang Yu
051a520776 Create a WvCasStatus to be used as return type of libraries in media_cas_packager_sdk.
Following example: []/video/widevine/export/provisioning_sdk/public/provisioning_status.h
and
[]/video/widevine/export/exported_root/util/status.h

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=218918745
2018-10-26 15:00:41 -07:00
Fang Yu
70f62ed75e (1) Return a boolean instead of util::Status for methods in wv_cas_ecm.h
(2) Update wv_cas_ecm_example to NOT depend on ABSL

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=218884631
2018-10-26 11:23:12 -07:00
Fang Yu
947b950d95 (1) Change wv_cas_ecm to allow 16 bytes of content_iv
(2) Remove "wrapping_iv" parameters from wv_cas_ecm
(3) Internally derive "wrapping_iv"s and "key_id"s
(4) Add an example binary for demo the usage of wv_cas_ecm

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=218209010
2018-10-22 13:26:28 -07:00