Exposing the Cast Signing Algorithm

[ Merge of http://go/wvgerrit/178076 ]

1. Exposing the Cast Signing Algorithm in cdm core.
2. Update core Cast tests to use new core CDM Cast signing API.

Bug: 279671867
Bug: 279672538
Test: com.google.android.wvts
Change-Id: Ia73c4b5e6dd61edf790bca97a321881d310e7a99
(cherry picked from commit 8996b624d73adf14db45e54653e7ddc513f3895c)
This commit is contained in:
Kyle Zhang
2023-04-27 19:12:09 +00:00
parent d655ffbfe7
commit bd389027a1
10 changed files with 108 additions and 60 deletions

View File

@@ -349,6 +349,11 @@ class CryptoSession {
virtual CdmResponseType LoadOtaProvisioning(bool use_test_key,
const std::string& response);
// Cast specific generate signature method.
virtual CdmResponseType GenerateRsaSignature(const std::string& message,
std::string* signature,
RSA_Padding_Scheme scheme);
protected:
// Creates an instance of CryptoSession with the given |crypto_metrics|.
// |crypto_metrics| is owned by the caller, must NOT be null, and must
@@ -387,8 +392,6 @@ class CryptoSession {
// Note: This function will lock the global static field lock in write mode.
bool SetUpUsageTable(RequestedSecurityLevel requested_security_level);
CdmResponseType GenerateRsaSignature(const std::string& message,
std::string* signature);
size_t GetMaxSubsampleRegionSize();
bool SetDestinationBufferType();