Exposing the Cast Signing Algorithm
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 Change-Id: Ia73c4b5e6dd61edf790bca97a321881d310e7a99
This commit is contained in:
@@ -388,6 +388,13 @@ class CdmEngine {
|
||||
virtual void SetDefaultOtaKeyboxFallbackDurationRules();
|
||||
virtual void SetFastOtaKeyboxFallbackDurationRules();
|
||||
|
||||
// A signing method specifically used by Cast.
|
||||
// This method should not be used otherwise.
|
||||
virtual CdmResponseType SignRSA(const std::string& wrapped_key,
|
||||
const std::string& message,
|
||||
std::string* signature,
|
||||
RSA_Padding_Scheme padding_scheme);
|
||||
|
||||
protected:
|
||||
friend class CdmEngineFactory;
|
||||
|
||||
|
||||
@@ -219,6 +219,13 @@ class CdmSession {
|
||||
|
||||
virtual metrics::SessionMetrics* GetMetrics() { return metrics_.get(); }
|
||||
|
||||
virtual CdmResponseType LoadCastPrivateKey(
|
||||
const CryptoWrappedKey& private_key);
|
||||
|
||||
virtual CdmResponseType GenerateRSASignature(const std::string& message,
|
||||
std::string* signature,
|
||||
RSA_Padding_Scheme scheme);
|
||||
|
||||
private:
|
||||
friend class CdmSessionTest;
|
||||
|
||||
|
||||
@@ -347,6 +347,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
|
||||
@@ -385,8 +390,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();
|
||||
|
||||
@@ -460,6 +460,7 @@ enum CdmResponseEnum : int32_t {
|
||||
STORE_ATSC_LICENSE_DEVICE_FILES_INIT_ERROR = 394,
|
||||
STORE_ATSC_LICENSE_ERROR = 395,
|
||||
SESSION_NOT_FOUND_GENERIC_CRYPTO = 396,
|
||||
SESSION_NOT_FOUND_24 = 397,
|
||||
// Don't forget to add new values to
|
||||
// * core/src/wv_cdm_types.cpp
|
||||
// * android/include/mapErrors-inl.h
|
||||
|
||||
Reference in New Issue
Block a user